Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
castus committed Oct 23, 2023
1 parent bf7bafb commit 8e477df
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
FROM --platform=$BUILDPLATFORM golang:1.21.3 AS builder
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETARCH
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
FROM golang:1.21.3 AS builder

WORKDIR /data
COPY . /data
RUN GOOS=linux GOARCH=$TARGETARCH go build -o lights-api
RUN GOOS=linux GOARCH=amd64 go build -o lights-api

FROM scratch
FROM ubuntu:mantic
COPY --from=builder /data/lights-api ./
CMD ["./lights-api"]

0 comments on commit 8e477df

Please sign in to comment.