github.com/mysteriumnetwork/node@v0.0.0-20240516044423-365054f76801/bin/docker/alpine/Dockerfile (about) 1 FROM --platform=$BUILDPLATFORM golang:1.20-alpine AS builder 2 3 # Install packages 4 RUN apk add --no-cache git bash gcc musl-dev make linux-headers 5 6 ARG BUILD_BRANCH=$BUILD_BRANCH 7 ARG BUILD_COMMIT=$BUILD_COMMIT 8 ARG BUILD_NUMBER=$BUILD_NUMBER 9 ARG BUILD_VERSION=$BUILD_VERSION 10 11 # Compile application 12 WORKDIR /go/src/github.com/mysteriumnetwork/node 13 ADD go.mod go.sum ./ 14 RUN go mod download 15 ADD . . 16 ARG TARGETOS TARGETARCH 17 RUN GOOS=$TARGETOS GOARCH=$TARGETARCH BUILD_STATIC=1 bin/build 18 19 20 FROM alpine:3.14 21 22 # Install packages 23 RUN apk add --no-cache iptables ipset ca-certificates openvpn bash sudo openresolv 24 25 COPY bin/helpers/prepare-run-env.sh /usr/local/bin/prepare-run-env.sh 26 COPY bin/docker/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh 27 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] 28 29 COPY bin/package/config/common /etc/mysterium-node 30 COPY bin/package/config/linux /etc/mysterium-node 31 32 COPY --from=builder /go/src/github.com/mysteriumnetwork/node/build/myst/myst /usr/bin/myst 33 34 WORKDIR /var/run/myst