Fix docker build
This commit is contained in:
parent
7b6838429a
commit
9a769fb963
@ -6,11 +6,11 @@ ARG TARGETOS
|
|||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
WORKDIR /app/
|
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 ./
|
ADD go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
ADD . .
|
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
|
FROM --platform=${TARGETPLATFORM:-linux/amd64} scratch
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
|||||||
.DEFAULT_GOAL := default
|
.DEFAULT_GOAL := default
|
||||||
|
|
||||||
IMAGE ?= docker.cluster.fun/averagemarcus/gopherss:latest
|
IMAGE ?= docker.cluster.fun/averagemarcus/gopherss:latest
|
||||||
PLATFORMS ?= linux/amd64,linux/arm/v7,linux/arm64
|
PLATFORMS ?= linux/amd64
|
||||||
|
|
||||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user