.
This commit is contained in:
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Build stage
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go build -o bin/server ./cmd/server
|
||||
|
||||
# Run stage
|
||||
FROM alpine:latest
|
||||
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/bin/server .
|
||||
COPY --from=builder /app/config ./config
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./server", "-config", "config/config.yaml"]
|
||||
Reference in New Issue
Block a user