mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
fix: use static binaries in docker container
This is more robust cross-platform/architecture. fixes #7422
This commit is contained in:
parent
b86e93045a
commit
1034724ca0
@ -33,14 +33,14 @@ ENV TINI_VERSION v0.19.0
|
||||
RUN set -eux; \
|
||||
dpkgArch="$(dpkg --print-architecture)"; \
|
||||
case "${dpkgArch##*-}" in \
|
||||
"amd64" | "armhf" | "arm64") tiniArch="tini-$dpkgArch" ;;\
|
||||
"amd64" | "armhf" | "arm64") tiniArch="tini-static-$dpkgArch" ;;\
|
||||
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
|
||||
esac; \
|
||||
cd /tmp \
|
||||
&& git clone https://github.com/ncopa/su-exec.git \
|
||||
&& cd su-exec \
|
||||
&& git checkout -q $SUEXEC_VERSION \
|
||||
&& make \
|
||||
&& make su-exec-static \
|
||||
&& cd /tmp \
|
||||
&& wget -q -O tini https://github.com/krallin/tini/releases/download/$TINI_VERSION/$tiniArch \
|
||||
&& chmod +x tini
|
||||
@ -53,7 +53,7 @@ LABEL maintainer="Steven Allen <steven@stebalien.com>"
|
||||
ENV SRC_DIR /go-ipfs
|
||||
COPY --from=0 $SRC_DIR/cmd/ipfs/ipfs /usr/local/bin/ipfs
|
||||
COPY --from=0 $SRC_DIR/bin/container_daemon /usr/local/bin/start_ipfs
|
||||
COPY --from=0 /tmp/su-exec/su-exec /sbin/su-exec
|
||||
COPY --from=0 /tmp/su-exec/su-exec-static /sbin/su-exec
|
||||
COPY --from=0 /tmp/tini /sbin/tini
|
||||
COPY --from=0 /bin/fusermount /usr/local/bin/fusermount
|
||||
COPY --from=0 /etc/ssl/certs /etc/ssl/certs
|
||||
|
||||
Loading…
Reference in New Issue
Block a user