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 RUN apk add --no-cache git build-base
COPY go.mod go.sum ./
RUN go mod download
COPY . . COPY . .
ENV CGO_ENABLED=0 RUN make
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 alpine:3.19
FROM scratch COPY --from=builder /src/fes /usr/local/bin/fes
COPY --from=builder /src/fes /fes
WORKDIR /app WORKDIR /app
EXPOSE 8080 EXPOSE 3000
ENTRYPOINT ["/fes"] ENTRYPOINT ["/usr/local/bin/fes"]
CMD ["run", "/app"] CMD ["run", "/app"]