-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add dockerfile * update dockerfile * update filepath * copy repo in docker * remove install line * update dockerfile copy path * add platform to dockerfile * remove platform * replace scratch with alpine * refresh dockerfile with alpine image * add user and mkdir * try dockerfile without glib dependency lines * final dockerfile set up with glib * add mkdir and chown lines to dockerfile * add codefresh yml * remove unecessary lines and update version tag
- Loading branch information
Showing
2 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM --platform=linux/x86_64 alpine:latest | ||
ENV GLIBC_REPO=https://github.com/sgerrand/alpine-pkg-glibc | ||
ENV GLIBC_VERSION=2.30-r0 | ||
RUN set -ex && \ | ||
apk --update add libstdc++ curl ca-certificates && \ | ||
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION}; \ | ||
do curl -sSL ${GLIBC_REPO}/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \ | ||
apk add --allow-untrusted /tmp/*.apk && \ | ||
rm -v /tmp/*.apk && \ | ||
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib | ||
COPY ./sloctl /usr/local/bin/sloctl | ||
RUN adduser -D appuser | ||
RUN mkdir -p /home/appuser/.config/nobl9 | ||
RUN chown -R appuser:appuser /home/appuser/.config/nobl9 | ||
USER appuser | ||
ENTRYPOINT ["sloctl"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: "1.0" | ||
|
||
stages: | ||
- "clone" | ||
- "build" | ||
|
||
steps: | ||
clone: | ||
title: "Cloning repository" | ||
type: "git-clone" | ||
repo: "nobl9/sloctl" | ||
# CF_BRANCH value is auto set when pipeline is triggered | ||
# Learn more at codefresh.io/docs/docs/codefresh-yaml/variables/ | ||
revision: "${{CF_BRANCH}}" | ||
git: "github" | ||
stage: "clone" | ||
|
||
install: | ||
title: "Install sloctl" | ||
type: "freestyle" # Run any command | ||
image: "ubuntu:latest" # The image in which command will be executed | ||
working_directory: "${{clone}}" # Running command where code cloned | ||
commands: | ||
- "apt-get update" | ||
- "apt-get install -y git" | ||
- "apt-get install zip unzip" | ||
- "unzip sloctl-linux-*.zip" | ||
- "rm sloctl-*.zip" | ||
- "cf_export VERSION=$(git describe --tags --abbrev=0)" | ||
stage: "build" | ||
|
||
build: | ||
title: "Building docker image" | ||
type: "build" | ||
working_directory: "${{clone}}" | ||
arguments: | ||
image_name: "nobl9/sloctl" | ||
dockerfile: 'Dockerfile' | ||
registry: "nobl9" | ||
tags: | ||
- "latest" | ||
- "v${{VERSION}}" | ||
stage: "build" | ||
|