fix: use static binaries in docker container
This is more robust cross-platform/architecture. fixes #7422
Steven Allen committed
Jun 23, 2020 at 14:03 UTC
1034724ca075e5208ad62a63032693b79d07aeca
1 file changed
+3
-3
Dockerfile
+3
-3
@@ -33,14 +33,14 @@ ENV TINI_VERSION v0.19.0
33
RUN set -eux; \
34
dpkgArch="$(dpkg --print-architecture)"; \
35
case "${dpkgArch##*-}" in \
36
- "amd64" | "armhf" | "arm64") tiniArch="tini-$dpkgArch" ;;\
36
+ "amd64" | "armhf" | "arm64") tiniArch="tini-static-$dpkgArch" ;;\
37
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
38
esac; \
39
cd /tmp \
40
&& git clone https://github.com/ncopa/su-exec.git \
41
&& cd su-exec \
42
&& git checkout -q $SUEXEC_VERSION \
43
- && make \
43
+ && make su-exec-static \
44
&& cd /tmp \
45
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/$tiniArch \
46
&& chmod +x tini
@@ -53,7 +53,7 @@ LABEL maintainer="Steven Allen <steven@stebalien.com>"
53
ENV SRC_DIR /go-ipfs
54
COPY --from=0 $SRC_DIR/cmd/ipfs/ipfs /usr/local/bin/ipfs
55
COPY --from=0 $SRC_DIR/bin/container_daemon /usr/local/bin/start_ipfs
56
-COPY --from=0 /tmp/su-exec/su-exec /sbin/su-exec
56
+COPY --from=0 /tmp/su-exec/su-exec-static /sbin/su-exec
57
COPY --from=0 /tmp/tini /sbin/tini
58
COPY --from=0 /bin/fusermount /usr/local/bin/fusermount
59
COPY --from=0 /etc/ssl/certs /etc/ssl/certs