mirror of
https://github.com/zokradonh/kopano-docker.git
synced 2026-08-23 14:22:54 +00:00
add all ci relevant tools to the build helper (#290)
also push the build helper into the docker hub Signed-off-by: Felix Bartels <felix@host-consultants.de>
This commit is contained in:
+30
-9
@@ -1,12 +1,33 @@
|
||||
FROM docker:18.09.6
|
||||
ENV COMPOSE_VERSION "1.19.0"
|
||||
ENV REG_VERSION "0.16.0"
|
||||
RUN apk add --no-cache bash curl coreutils git expect make nano jq py-pip
|
||||
RUN pip install --no-cache-dir docker-compose==${COMPOSE_VERSION}
|
||||
# the 0.16.0 release of reg has a bug that breaks loading tags from the docker hub.
|
||||
# issue is fixed in master, but not in a release.
|
||||
# rel https://github.com/genuinetools/reg/issues/186
|
||||
RUN curl -fSL "https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64" -o "/usr/local/bin/reg" \
|
||||
&& chmod a+x "/usr/local/bin/reg"
|
||||
ENV \
|
||||
COMMANDER_VERSION=1.2.1 \
|
||||
COMPOSE_VERSION=1.19.0 \
|
||||
GOSS_VERSION=0.3.7 \
|
||||
HADOLINT_VERSION=1.17.1 \
|
||||
REG_VERSION=0.16.1 \
|
||||
TRIVY_VERSION=0.1.1
|
||||
|
||||
LABEL maintainer=az@zok.xyz \
|
||||
org.label-schema.name="Kopano Container Builder" \
|
||||
org.label-schema.description="Helper Container to help building and testing containers" \
|
||||
org.label-schema.url="https://kopano.io" \
|
||||
org.label-schema.vcs-url="https://github.com/zokradonh/kopano-docker/build/" \
|
||||
org.label-schema.version=1.0.0 \
|
||||
org.label-schema.schema-version="1.0"
|
||||
|
||||
RUN apk add --no-cache bash curl coreutils git grep expect make nano npm jq py-pip && \
|
||||
apk add --no-cache shellcheck --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||
|
||||
RUN curl -fSL "https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64" -o "/usr/local/bin/reg" && \
|
||||
curl -fSL "https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$(uname -s)-$(uname -m)" -o /usr/local/bin/hadolint && \
|
||||
curl -fSL "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
|
||||
curl -fSL "https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64" -o /usr/local/bin/goss && \
|
||||
curl -L "https://raw.githubusercontent.com/fbartels/goss/dcgoss-v2/extras/dcgoss/dcgoss -o /usr/local/bin/dcgoss" && \
|
||||
curl -fSL "https://github.com/SimonBaeumer/commander/releases/download/v$COMMANDER_VERSION/commander-linux-amd64" -o /usr/local/bin/commander && \
|
||||
curl -fSL "https://raw.githubusercontent.com/fbartels/dccommander/master/dccommander" -o /usr/local/bin/dccommander && \
|
||||
pip install yamllint==1.19.0 && \
|
||||
npm install -g eclint@2.8.1 && \
|
||||
chmod a+x /usr/local/bin/*
|
||||
|
||||
WORKDIR /kopano-docker
|
||||
CMD ["bash"]
|
||||
|
||||
+3
-2
@@ -5,11 +5,12 @@ fi
|
||||
|
||||
cd "$(dirname "$0")" || exit
|
||||
|
||||
docker build .
|
||||
docker pull zokradonh/kopano_build:latest || true
|
||||
docker build --cache-from zokradonh/kopano_build:latest .
|
||||
|
||||
docker run \
|
||||
--rm -it \
|
||||
-u "$(id -u)":"$(id -g)" \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v "$(pwd)"/..:/kopano-docker/ \
|
||||
"$(docker build -q .)" "$@"
|
||||
"$(docker build --cache-from zokradonh/kopano_build:latest -q .)" "$@"
|
||||
|
||||
Reference in New Issue
Block a user