Files
fes/Dockerfile

28 lines
410 B
Docker

FROM golang:1.25-alpine AS builder
WORKDIR /src
RUN apk add --no-cache git build-base
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
RUN go build -ldflags="-X fes/modules/version.gitCommit=$(git rev-parse --short HEAD) -s -w" -o fes
FROM scratch
COPY --from=builder /src/fes /fes
WORKDIR /app
EXPOSE 8080
ENTRYPOINT ["/fes"]
CMD ["run", "/app"]