docker: reduce additional image layer for the not executable gosu binary (#6557)

This will help reduce the image size and image layers.
This commit is contained in:
Peter Dave Hello 2021-05-19 13:31:19 +08:00 committed by GitHub
parent d6987ee05b
commit c4cf659e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -10,8 +10,8 @@ COPY . .
RUN make build TAGS="cert pam"
FROM alpine:3.11
ADD https://github.com/tianon/gosu/releases/download/1.11/gosu-amd64 /usr/sbin/gosu
RUN chmod +x /usr/sbin/gosu \
RUN wget https://github.com/tianon/gosu/releases/download/1.11/gosu-amd64 -O /usr/sbin/gosu \
&& chmod +x /usr/sbin/gosu \
&& echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \
&& apk --no-cache --no-progress add \
bash \

View File

@ -10,8 +10,8 @@ COPY . .
RUN make build TAGS="cert pam"
FROM arm64v8/alpine:3.11
ADD https://github.com/tianon/gosu/releases/download/1.11/gosu-arm64 /usr/sbin/gosu
RUN chmod +x /usr/sbin/gosu \
RUN wget https://github.com/tianon/gosu/releases/download/1.11/gosu-arm64 -O /usr/sbin/gosu \
&& chmod +x /usr/sbin/gosu \
&& echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \
&& apk --no-cache --no-progress add \
bash \

View File

@ -10,8 +10,8 @@ COPY . .
RUN make build TAGS="cert pam"
FROM arm32v7/alpine:3.12
ADD https://github.com/tianon/gosu/releases/download/1.12/gosu-armhf /usr/sbin/gosu
RUN chmod +x /usr/sbin/gosu \
RUN wget https://github.com/tianon/gosu/releases/download/1.12/gosu-armhf -O /usr/sbin/gosu \
&& chmod +x /usr/sbin/gosu \
&& echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories \
&& apk --no-cache --no-progress add \
bash \