mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 15:30:05 +00:00
24 lines
355 B
Docker
24 lines
355 B
Docker
FROM golang:1.23 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=1 GOOS=linux go build -o main .
|
|
|
|
FROM ubuntu:latest
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y ca-certificates
|
|
RUN update-ca-certificates
|
|
|
|
COPY --from=builder /app/main .
|
|
COPY --from=builder /app/*.env .
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["./main"]
|