mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-31 14:22:33 +01:00
fix/ignore non working xterm (due to /etc volume); download latest docker
This commit is contained in:
parent
0e5cada34d
commit
28d3a4b456
2 changed files with 23 additions and 19 deletions
|
@ -4,28 +4,26 @@ FROM alpine:3.3
|
|||
MAINTAINER dockerbench.com
|
||||
MAINTAINER Alexei Ledenev <alexei.led@gmail.com>
|
||||
|
||||
ENV VERSION 1.10.0
|
||||
ENV VERSION 1.11.1
|
||||
ENV BATS_VERSION 0.4.0
|
||||
|
||||
LABEL docker_bench_security=true
|
||||
|
||||
WORKDIR /usr/bin
|
||||
RUN apk --update add curl bash \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm /var/cache/apk/*
|
||||
|
||||
RUN apk update && \
|
||||
apk upgrade && \
|
||||
apk --update add curl bash ncurses ncurses-terminfo && \
|
||||
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/docker-$VERSION.tgz" -LS "https://get.docker.com/builds/Linux/x86_64/docker-$VERSION.tgz" && \
|
||||
curl -o "/tmp/docker-$VERSION.tgz.sha256" -LS "https://get.docker.com/builds/Linux/x86_64/docker-$VERSION.tgz.sha256" && \
|
||||
cd /tmp && sha256sum -c docker-$VERSION.tgz.sha256 && \
|
||||
tar -xvzf "/tmp/docker-$VERSION.tgz" -C /tmp/ && \
|
||||
chmod u+x /tmp/docker/docker && mv /tmp/docker/docker /usr/bin/ && \
|
||||
rm -rf /tmp/*
|
||||
|
||||
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 curl -o "/tmp/v${BATS_VERSION}.tar.gz" -LS "https://github.com/sstephenson/bats/archive/v${BATS_VERSION}.tar.gz" && \
|
||||
tar -xvzf "/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
|
||||
|
||||
|
|
12
run_tests.sh
12
run_tests.sh
|
@ -22,9 +22,15 @@ OPT_OUTPUT=$TEST_RESULTS
|
|||
OPT_RESULTS=1
|
||||
|
||||
#Set fonts for Help.
|
||||
BOLD=`tput bold`
|
||||
REV=`tput smso`
|
||||
NORM=`tput sgr0`
|
||||
if [ -e "/usr/bin/tput" ]; then
|
||||
BOLD=`tput bold`
|
||||
REV=`tput smso`
|
||||
NORM=`tput sgr0`
|
||||
else
|
||||
BOLD=""
|
||||
REV=""
|
||||
NORM=""
|
||||
fi
|
||||
|
||||
#Help function
|
||||
HELP() {
|
||||
|
|
Loading…
Reference in a new issue