2016-05-13 17:20:50 +02:00
|
|
|
# REPOSITORY https://github.com/docker/docker-bench-securit
|
|
|
|
FROM alpine:3.3
|
|
|
|
|
|
|
|
MAINTAINER dockerbench.com
|
|
|
|
MAINTAINER Alexei Ledenev <alexei.led@gmail.com>
|
|
|
|
|
|
|
|
ENV VERSION 1.10.0
|
|
|
|
ENV BATS_VERSION 0.4.0
|
|
|
|
|
2016-05-15 17:01:08 +02:00
|
|
|
LABEL docker_bench_security=true
|
|
|
|
|
2016-05-13 17:20:50 +02:00
|
|
|
WORKDIR /usr/bin
|
|
|
|
|
|
|
|
RUN apk update && \
|
|
|
|
apk upgrade && \
|
2016-05-15 17:01:08 +02:00
|
|
|
apk --update add curl bash ncurses ncurses-terminfo && \
|
2016-05-13 17:20:50 +02:00
|
|
|
curl -sS https://get.docker.com/builds/Linux/x86_64/docker-$VERSION > docker-$VERSION && \
|
|
|
|
curl -sS https://get.docker.com/builds/Linux/x86_64/docker-$VERSION.sha256 > docker-$VERSION.sha256 && \
|
|
|
|
sha256sum -c docker-$VERSION.sha256 && \
|
|
|
|
ln -s docker-$VERSION docker && \
|
|
|
|
chmod u+x docker-$VERSION && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN curl -o "/tmp/v${BATS_VERSION}.tar.gz" -L \
|
|
|
|
"https://github.com/sstephenson/bats/archive/v${BATS_VERSION}.tar.gz" \
|
|
|
|
&& tar -x -z -f "/tmp/v${BATS_VERSION}.tar.gz" -C /tmp/ \
|
|
|
|
&& bash "/tmp/bats-${BATS_VERSION}/install.sh" /usr/local \
|
|
|
|
&& rm -rf /tmp/*
|
|
|
|
|
|
|
|
RUN mkdir /docker-bench-security
|
|
|
|
|
|
|
|
COPY . /docker-bench-security
|
2016-05-15 17:01:08 +02:00
|
|
|
RUN chmod +x /docker-bench-security/run_tests.sh
|
2016-05-13 17:20:50 +02:00
|
|
|
|
|
|
|
WORKDIR /docker-bench-security
|
|
|
|
|
2016-05-15 17:01:08 +02:00
|
|
|
VOLUME /var/docker-bench
|
|
|
|
|
|
|
|
CMD ["-r"]
|
|
|
|
ENTRYPOINT ["./run_tests.sh"]
|