Browse Source

Dockerfile: add ARM64 and ARMhf support (#6579)

Co-authored-by: Luciano Colosio <[email protected]>
odidev 3 years ago
parent
commit
82652f0f08
1 changed files with 8 additions and 1 deletions
  1. 8 1
      Dockerfile

+ 8 - 1
Dockerfile

@@ -10,7 +10,14 @@ COPY . .
 RUN make build TAGS="cert pam"
 
 FROM alpine:3.11
-RUN wget https://github.com/tianon/gosu/releases/download/1.11/gosu-amd64 -O /usr/sbin/gosu \
+RUN if [ `uname -m` == "aarch64" ] ; then \
+      export arch="arm64" ; \
+  elif [ `uname -m` == "armv7l" ] ; then \
+      export arch="armhf"; \
+  else \
+      export arch="amd64" ; \
+  fi \
+  && wget https://github.com/tianon/gosu/releases/download/1.11/gosu-$arch -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 \