From b8728927e4f61e4cd139dc8639a964bb29849247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sj=C3=B6gren?= Date: Tue, 22 Dec 2015 20:46:56 +0100 Subject: [PATCH] keep docker updated, shrink image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Sjögren --- Dockerfile | 13 ++++++++++++- distros/Dockerfile.alpine | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index ae8946d..e873b0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,22 @@ FROM alpine:3.2 +ENV VERSION 1.9.1 + MAINTAINER dockerbench.com +WORKDIR /usr/bin + RUN apk update && \ apk upgrade && \ - apk --update add docker + apk --update add curl && \ + 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 && \ + apk del curl && \ + rm -rf /var/cache/apk/* RUN mkdir /docker-bench-security diff --git a/distros/Dockerfile.alpine b/distros/Dockerfile.alpine index ae8946d..e873b0f 100644 --- a/distros/Dockerfile.alpine +++ b/distros/Dockerfile.alpine @@ -2,11 +2,22 @@ FROM alpine:3.2 +ENV VERSION 1.9.1 + MAINTAINER dockerbench.com +WORKDIR /usr/bin + RUN apk update && \ apk upgrade && \ - apk --update add docker + apk --update add curl && \ + 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 && \ + apk del curl && \ + rm -rf /var/cache/apk/* RUN mkdir /docker-bench-security