Files
arbeitszeitmessung/Backend/Dockerfile
Tom Tröger bf841ad5c6
Some checks failed
Tests / Run Go Tests (push) Failing after 1m26s
updated sonarqube + fixed first issues
2025-10-07 15:47:59 +02:00

23 lines
439 B
Docker

# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM golang:alpine AS build
ARG TARGETOS
ARG TARGETARCH
ENV CGO_ENABLED=0 \
GOOS=$TARGETOS \
GOARCH=$TARGETARCH
WORKDIR /app
COPY go.mod go.sum /app/
RUN go mod download && go mod verify
COPY . .
RUN go build -o server .
FROM alpine:3.22
RUN apk add --no-cache tzdata
WORKDIR /app
COPY --from=build /app/server /app/server
COPY /static /app/static
ENTRYPOINT ["./server"]