Skip to content

Commit

Permalink
Merge pull request #272 from ellerbrock/alpine-upgrade
Browse files Browse the repository at this point in the history
feat(dockerfile): update alpine and cleanup the dockerfile
  • Loading branch information
konstruktoid committed Dec 14, 2017
2 parents d05852c + 2521d59 commit 688a824
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
24 changes: 11 additions & 13 deletions Dockerfile
@@ -1,27 +1,25 @@
FROM alpine:3.6
FROM alpine:3.7

LABEL org.label-schema.name="docker-bench-security" \
org.label-schema.url="https://dockerbench.com" \
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"

# Switch to the HTTPS endpoint for the apk repositories as per https://github.com/gliderlabs/docker-alpine/issues/184
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
LABEL \
org.label-schema.name="docker-bench-security" \
org.label-schema.url="https://dockerbench.com" \
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"

# Switch to the HTTPS endpoint for the apk repositories
# https://github.com/gliderlabs/docker-alpine/issues/184
RUN \
apk upgrade --no-cache && \
sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories && \
apk add --no-cache \
docker \
dumb-init && \
rm -rf /usr/bin/docker-* /usr/bin/dockerd && \
mkdir /usr/local/bin/tests
rm -rf /usr/bin/docker?*

COPY ./*.sh /usr/local/bin/

COPY ./tests/*.sh /usr/local/bin/tests/

WORKDIR /usr/local/bin

HEALTHCHECK CMD exit 0

WORKDIR /usr/local/bin

ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]

21 changes: 11 additions & 10 deletions distros/Dockerfile.alpine
@@ -1,24 +1,25 @@
FROM alpine:3.6
FROM alpine:3.7

LABEL org.label-schema.name="docker-bench-security" \
org.label-schema.url="https://dockerbench.com" \
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"
LABEL \
org.label-schema.name="docker-bench-security" \
org.label-schema.url="https://dockerbench.com" \
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"

# Switch to the HTTPS endpoint for the apk repositories
# https://github.com/gliderlabs/docker-alpine/issues/184
RUN \
apk upgrade --no-cache && \
sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories && \
apk add --no-cache \
docker \
dumb-init && \
rm -rf /usr/bin/docker-* /usr/bin/dockerd && \
mkdir /usr/local/bin/tests
rm -rf /usr/bin/docker?*

COPY ./*.sh /usr/local/bin/

COPY ./tests/*.sh /usr/local/bin/tests/

WORKDIR /usr/local/bin

HEALTHCHECK CMD exit 0

WORKDIR /usr/local/bin

ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]

0 comments on commit 688a824

Please sign in to comment.