Browse Source

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

This will help reduce the image size and image layers.
Peter Dave Hello 3 years ago
parent
commit
c4cf659e32
3 changed files with 6 additions and 6 deletions
  1. 2 2
      Dockerfile
  2. 2 2
      docker/Dockerfile.aarch64
  3. 2 2
      docker/Dockerfile.rpi

+ 2 - 2
Dockerfile

@@ -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 \

+ 2 - 2
docker/Dockerfile.aarch64

@@ -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 \

+ 2 - 2
docker/Dockerfile.rpi

@@ -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 \