Files
arbeitszeitmessung/Backend/Dockerfile
Tom Tröger fdda0ea669
All checks were successful
Tests / Run Go Tests (push) Successful in 2m7s
Arbeitszeitmessung Deploy / Build Webserver (push) Successful in 2m45s
moved migrations
2026-01-18 22:50:51 +01:00

27 lines
493 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 typst
WORKDIR /app
COPY --from=build /app/server /app/server
COPY migrations /app/migrations
COPY doc /doc
COPY /static /app/static
ENTRYPOINT ["./server"]