mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2024-12-21 20:53:00 -05:00
20 lines
No EOL
381 B
Docker
20 lines
No EOL
381 B
Docker
FROM docker.io/golang:latest as builder
|
|
|
|
# Create and change to the app directory.
|
|
WORKDIR /app
|
|
COPY go.* ./
|
|
RUN go mod download
|
|
|
|
COPY . ./
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o server
|
|
|
|
FROM docker.io/alpine:3
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
COPY --from=builder /app/server /server
|
|
ENV PORT=8080
|
|
ENV GIN_MODE=release
|
|
EXPOSE 8080
|
|
|
|
ENTRYPOINT ["/server"] |