mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
feat(dockerfile): update alpine and cleanup the dockerfile
Signed-off-by: Maik Ellerbrock <opensource@frapsoft.com>
This commit is contained in:
parent
d05852c171
commit
be2a7b6b6e
2 changed files with 23 additions and 28 deletions
26
Dockerfile
26
Dockerfile
|
@ -1,27 +1,23 @@
|
||||||
FROM alpine:3.6
|
FROM alpine:3.7
|
||||||
|
|
||||||
LABEL org.label-schema.name="docker-bench-security" \
|
LABEL \
|
||||||
org.label-schema.url="https://dockerbench.com" \
|
org.label-schema.name="docker-bench-security" \
|
||||||
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"
|
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
|
COPY ./*.sh /usr/local/bin/
|
||||||
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
|
COPY ./tests/*.sh /usr/local/bin/tests/
|
||||||
|
|
||||||
|
# Switch to the HTTPS endpoint for the apk repositories
|
||||||
|
# https://github.com/gliderlabs/docker-alpine/issues/184
|
||||||
RUN \
|
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 \
|
apk add --no-cache \
|
||||||
docker \
|
docker \
|
||||||
dumb-init && \
|
dumb-init && \
|
||||||
rm -rf /usr/bin/docker-* /usr/bin/dockerd && \
|
rm -rf /usr/bin/docker?*
|
||||||
mkdir /usr/local/bin/tests
|
|
||||||
|
|
||||||
COPY ./*.sh /usr/local/bin/
|
|
||||||
|
|
||||||
COPY ./tests/*.sh /usr/local/bin/tests/
|
|
||||||
|
|
||||||
WORKDIR /usr/local/bin
|
WORKDIR /usr/local/bin
|
||||||
|
|
||||||
HEALTHCHECK CMD exit 0
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]
|
ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,23 @@
|
||||||
FROM alpine:3.6
|
FROM alpine:3.7
|
||||||
|
|
||||||
LABEL org.label-schema.name="docker-bench-security" \
|
LABEL \
|
||||||
org.label-schema.url="https://dockerbench.com" \
|
org.label-schema.name="docker-bench-security" \
|
||||||
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"
|
org.label-schema.url="https://dockerbench.com" \
|
||||||
|
org.label-schema.vcs-url="https://github.com/docker/docker-bench-security.git"
|
||||||
|
|
||||||
|
COPY ./*.sh /usr/local/bin/
|
||||||
|
COPY ./tests/*.sh /usr/local/bin/tests/
|
||||||
|
|
||||||
|
# Switch to the HTTPS endpoint for the apk repositories
|
||||||
|
# https://github.com/gliderlabs/docker-alpine/issues/184
|
||||||
RUN \
|
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 \
|
apk add --no-cache \
|
||||||
docker \
|
docker \
|
||||||
dumb-init && \
|
dumb-init && \
|
||||||
rm -rf /usr/bin/docker-* /usr/bin/dockerd && \
|
rm -rf /usr/bin/docker?*
|
||||||
mkdir /usr/local/bin/tests
|
|
||||||
|
|
||||||
COPY ./*.sh /usr/local/bin/
|
|
||||||
|
|
||||||
COPY ./tests/*.sh /usr/local/bin/tests/
|
|
||||||
|
|
||||||
WORKDIR /usr/local/bin
|
WORKDIR /usr/local/bin
|
||||||
|
|
||||||
HEALTHCHECK CMD exit 0
|
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]
|
ENTRYPOINT [ "/usr/bin/dumb-init", "docker-bench-security.sh" ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue