@cryptotaxi247 / kubo / commits / b3e8ddf71

docker: change to releases that follow debian's updates

Jorropo committed Aug 19, 2023 at 00:44 UTC b3e8ddf717692cc43fd86fc47be5148e1a64c583
1 file changed +5 -15
Dockerfile
+5 -15
@@ -1,6 +1,6 @@
1 -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19-bookworm AS builder
1 +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.19 AS builder
2
3 -ARG TARGETPLATFORM TARGETOS TARGETARCH
3 +ARG TARGETOS TARGETARCH
4
5 ENV SRC_DIR /kubo
6
@@ -19,12 +19,12 @@ ARG IPFS_PLUGINS
19 # Also: fix getting HEAD commit hash via git rev-parse.
20 RUN cd $SRC_DIR \
21 && mkdir -p .git/objects \
22 - && GOOS=$TARGETOS GOARCH=$TARGETARCH GOFLAGS=-buildvcs=false make build GOTAGS=openssl IPFS_PLUGINS=$IPFS_PLUGINS
22 + && GOOS=$TARGETOS GOARCH=$TARGETARCH GOFLAGS=-buildvcs=false make build IPFS_PLUGINS=$IPFS_PLUGINS
23
24 # Using Debian Buster because the version of busybox we're using is based on it
25 # and we want to make sure the libraries we're using are compatible. That's also
26 # why we're running this for the target platform.
27 -FROM debian:bookworm-slim AS utilities
27 +FROM debian:stable-slim AS utilities
28 RUN set -eux; \
29 apt-get update; \
30 apt-get install -y \
@@ -37,14 +37,11 @@ RUN set -eux; \
37 # This installs fusermount which we later copy over to the target image.
38 fuse \
39 ca-certificates \
40 - # This installs libssl.so and libcrypto.so which we later copy over to the
41 - # target image. We need these to be able to use the OpenSSL plugin.
42 - libssl-dev \
40 ; \
41 rm -rf /var/lib/apt/lists/*
42
43 # Now comes the actual target image, which aims to be as small as possible.
47 -FROM busybox:1.36.1-glibc
44 +FROM busybox:stable-glibc
45
46 # Get the ipfs binary, entrypoint script, and TLS CAs from the build container.
47 ENV SRC_DIR /kubo
@@ -62,13 +59,6 @@ RUN chmod 4755 /usr/local/bin/fusermount
59 # Fix permissions on start_ipfs (ignore the build machine's permissions)
60 RUN chmod 0755 /usr/local/bin/start_ipfs
61
65 -# This shared lib (part of glibc) doesn't seem to be included with busybox.
66 -COPY --from=utilities /lib/*-linux-gnu*/libdl.so.2 /lib/
67 -
68 -# Copy over SSL libraries.
69 -COPY --from=utilities /usr/lib/*-linux-gnu*/libssl.so* /usr/lib/
70 -COPY --from=utilities /usr/lib/*-linux-gnu*/libcrypto.so* /usr/lib/
71 -
62 # Swarm TCP; should be exposed to the public
63 EXPOSE 4001
64 # Swarm UDP; should be exposed to the public