From 9a769fb9633fb898bcc9cd66fc4437d2e121d6ee Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sat, 17 Oct 2020 22:12:32 +0100 Subject: [PATCH] Fix docker build --- Dockerfile | 4 ++-- Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1d3e6c0..119efe2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,11 +6,11 @@ ARG TARGETOS ARG TARGETARCH WORKDIR /app/ -RUN apk update && apk add --no-cache git gcc && adduser -D -g '' gopher && apk add -U --no-cache ca-certificates +RUN apk update && apk add --no-cache --update gcc musl-dev git && adduser -D -g '' gopher && apk add -U --no-cache ca-certificates ADD go.mod go.sum ./ RUN go mod download ADD . . -RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-w -s" -o gopherss . +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o gopherss . FROM --platform=${TARGETPLATFORM:-linux/amd64} scratch WORKDIR /app/ diff --git a/Makefile b/Makefile index 1698f3d..93c01a7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := default IMAGE ?= docker.cluster.fun/averagemarcus/gopherss:latest -PLATFORMS ?= linux/amd64,linux/arm/v7,linux/arm64 +PLATFORMS ?= linux/amd64 export DOCKER_CLI_EXPERIMENTAL=enabled