mirror of
https://github.com/chaitin/SafeLine.git
synced 2026-02-04 15:53:35 +08:00
17 lines
193 B
Docker
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"]
|