From 9464148db773bbb1544715bc15268bb528d34fe8 Mon Sep 17 00:00:00 2001 From: James Andariese Date: Sun, 3 Mar 2024 19:08:38 -0600 Subject: [PATCH] dockerfile with yq --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a59c829..56b4ac92 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21-bullseye AS builder +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21-alpine3.19 AS builder MAINTAINER Hector Sanjuan # This dockerfile builds and runs ipfs-cluster-service. @@ -8,6 +8,8 @@ ENV GOPATH /go ENV SRC_PATH $GOPATH/src/github.com/ipfs-cluster/ipfs-cluster ENV GOPROXY https://proxy.golang.org +RUN apk add --no-cache git alpine-sdk + COPY --chown=1000:users go.* $SRC_PATH/ WORKDIR $SRC_PATH RUN go mod download -x @@ -20,7 +22,7 @@ RUN make install #------------------------------------------------------ -FROM alpine:3.18 +FROM alpine:3.19 MAINTAINER Hector Sanjuan LABEL org.opencontainers.image.source=https://github.com/ipfs-cluster/ipfs-cluster @@ -28,7 +30,7 @@ LABEL org.opencontainers.image.description="Pinset orchestration for IPFS" LABEL org.opencontainers.image.licenses=MIT+APACHE_2.0 # Install binaries for $TARGETARCH -RUN apk add --no-cache tini su-exec ca-certificates +RUN apk add --no-cache tini su-exec ca-certificates curl yq ENV GOPATH /go ENV SRC_PATH /go/src/github.com/ipfs-cluster/ipfs-cluster