fix: update docker interface
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -2,19 +2,26 @@ 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 . .
|
||||
|
||||
RUN go build -o /fes main.go
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=amd64
|
||||
|
||||
FROM alpine:latest
|
||||
RUN go build -ldflags="-X fes/modules/version.gitCommit=$(git rev-parse --short HEAD) -s -w" -o fes
|
||||
|
||||
RUN apk add --no-cache bash lua5.4
|
||||
FROM scratch
|
||||
|
||||
COPY --from=builder /fes /usr/local/bin/fes
|
||||
COPY --from=builder /src/fes /fes
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["fes", "run", "/app"]
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["/fes"]
|
||||
CMD ["run", "/app"]
|
||||
|
||||
Reference in New Issue
Block a user