From 9dfac476e28c7184d3022c334a0a7430824c1303 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Fri, 31 Aug 2018 01:12:36 +0100 Subject: [PATCH] Install su-exec from spritsail repo Fix not removing libressl from https://github.com/spritsail/alpine/commit/6abb9f9d0370c3e976adfa699ab9704b1ebad086 This reduces the image size by ~0.5MiB --- Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30fd922..6cff094 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ -ARG SU_EXEC_VER=0.3 ARG ALPINE_TAG=3.8 FROM alpine:$ALPINE_TAG -ARG SU_EXEC_VER ARG ALPINE_TAG LABEL maintainer="Spritsail " \ @@ -11,19 +9,17 @@ LABEL maintainer="Spritsail " \ org.label-schema.name="Alpine Linux" \ org.label-schema.url="https://github.com/gliderlabs/docker-alpine" \ org.label-schema.description="Alpine Linux base image" \ - org.label-schema.version=${ALPINE_TAG} \ - io.spritsail.version.su-exec=${SU_EXEC_VER} + org.label-schema.version=${ALPINE_TAG} # Override shell for sh-y debugging goodness SHELL ["/bin/sh", "-exc"] COPY skel/ / ENV ENV="/etc/profile" -RUN apk --no-cache add \ - tini \ - libressl \ - && wget -qO /sbin/su-exec https://github.com/frebib/su-exec/releases/download/v${SU_EXEC_VER}/su-exec-alpine-$(uname -m) \ - && chmod +x /sbin/su-exec \ - && apk --no-cache del openssl +RUN sed -i '1ihttp://alpine.spritsail.io/spritsail' /etc/apk/repositories \ + && wget -P /etc/apk/keys https://alpine.spritsail.io/spritsail-alpine.rsa.pub \ + && apk --no-cache add \ + su-exec \ + tini ENTRYPOINT ["/sbin/tini" , "--"]