Files
SafeLine/backend/Dockerfile
2023-11-21 15:57:56 +08:00

17 lines
193 B
Docker

FROM golang:1.21 as build
WORKDIR /app
COPY . .
RUN go mod tidy && \
CGO_ENABLED=0 go build -o server .
FROM alpine:latest
WORKDIR /app
COPY --from=0 /app/server .
CMD ["./server"]