Try building an image

This commit is contained in:
2024-03-19 16:58:05 +01:00
parent fb2795f8f6
commit 5a04907bc5
3 changed files with 39 additions and 10 deletions

View File

@ -4,9 +4,9 @@ WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /softplayer-backend
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /app
FROM scratch
COPY --from=0 /app/softplayer-backend /bin/softplayer-backend
CMD ["/bin/softplayer-backend"]
COPY --from=0 /app /app
CMD ["/app"]