From f2fa7b53047de225b042700b13e051eb7c1f35b4 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Mon, 9 Sep 2024 16:50:41 +0800 Subject: [PATCH] Install platform-specific mkcert --- .../container-build/cerc-go-nitro/Dockerfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/stack-orchestrator/container-build/cerc-go-nitro/Dockerfile b/stack-orchestrator/container-build/cerc-go-nitro/Dockerfile index 7b2bac7..b159ecb 100644 --- a/stack-orchestrator/container-build/cerc-go-nitro/Dockerfile +++ b/stack-orchestrator/container-build/cerc-go-nitro/Dockerfile @@ -1,15 +1,16 @@ FROM golang:1.21-bullseye AS builder +ARG TARGETPLATFORM + +# Install mkcert +RUN curl -JL "https://dl.filippo.io/mkcert/latest?for=$TARGETPLATFORM" -o /usr/local/bin/mkcert && \ + chmod +x /usr/local/bin/mkcert + # Copy files into image WORKDIR /app COPY . . -# Install mkcert -RUN curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" -RUN chmod +x mkcert-v*-linux-amd64 -RUN cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert - -RUN go mod tidy +RUN go mod download # Build the binary RUN go build -v -o nitro .