fix: fix Dockerfile
This commit is contained in:
+3
-2
@@ -6,20 +6,21 @@ RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM golang AS builder2
|
||||
|
||||
ENV GO111MODULE=on \
|
||||
CGO_ENABLED=1 \
|
||||
GOOS=linux \
|
||||
GOARCH=amd64
|
||||
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
COPY --from=builder /build/build ./web/build
|
||||
RUN go mod download
|
||||
RUN go build -ldflags "-s -w" -o message-pusher
|
||||
RUN go build -ldflags "-s -w -extldflags '-static'" -o message-pusher
|
||||
|
||||
FROM scratch
|
||||
|
||||
ENV PORT=3000
|
||||
COPY --from=builder2 /build/message-pusher /
|
||||
EXPOSE 3000
|
||||
WORKDIR /data
|
||||
ENTRYPOINT ["/message-pusher"]
|
||||
|
||||
Reference in New Issue
Block a user