Skip to content

Commit

Permalink
Fix Dockerfile to always build for linux and amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper committed Oct 30, 2024
1 parent 3633c0b commit ca80e46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/framesd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
# (don't forget to update the -p accordingly)


FROM golang:1.19-bullseye as build
FROM --platform=linux/amd64 golang:1.19-bullseye as build

WORKDIR /frames
COPY . .
ARG FRAMES_VERSION=unknown
RUN go build -ldflags="-X main.Version=${FRAMES_VERSION}" ./cmd/framesd
RUN GOOS=linux GOARCH=amd64 go build -ldflags="-X main.Version=${FRAMES_VERSION}" ./cmd/framesd
RUN cp framesd /usr/local/bin

FROM debian:jessie-slim
FROM --platform=linux/amd64 debian:jessie-slim
COPY --from=build /usr/local/bin/framesd /usr/local/bin

VOLUME /etc/framesd
Expand Down

0 comments on commit ca80e46

Please sign in to comment.