rewrite Dockerfile

This commit is contained in:
2026-01-02 10:06:27 -05:00
parent 629fd06be0
commit f763f57001

View File

@@ -4,24 +4,17 @@ 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 make
RUN go build -ldflags="-X fes/modules/version.gitCommit=$(git rev-parse --short HEAD) -s -w" -o fes
FROM alpine:3.19
FROM scratch
COPY --from=builder /src/fes /fes
COPY --from=builder /src/fes /usr/local/bin/fes
WORKDIR /app
EXPOSE 8080
EXPOSE 3000
ENTRYPOINT ["/fes"]
ENTRYPOINT ["/usr/local/bin/fes"]
CMD ["run", "/app"]