summaryrefslogtreecommitdiff
path: root/server/Containerfile
blob: 39b4ae8cc151c16845033241ca258baaa7b9b497 (plain)
1
2
3
4
5
6
7
8
9
10
11
# Stage 1
FROM --platform=linux/amd64 golang:latest AS builder
WORKDIR /app
COPY . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o server cmd/main.go
# Stage 2
FROM alpine:latest
COPY --from=builder /app/server /app/server
WORKDIR /app
EXPOSE 8080
CMD ["./server"]