0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2025-01-18 02:12:28 -05:00
safetwitch-backend/Dockerfile

20 lines
381 B
Text
Raw Normal View History

2023-07-04 21:03:12 -04:00
FROM docker.io/golang:latest as builder
2023-06-07 17:00:58 -04:00
# 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
2023-06-07 21:21:23 +00:00
FROM docker.io/alpine:3
2023-06-07 17:00:58 -04:00
RUN apk add --no-cache ca-certificates
COPY --from=builder /app/server /server
ENV PORT=8080
2023-06-07 21:23:17 +00:00
ENV GIN_MODE=release
2023-06-07 17:00:58 -04:00
EXPOSE 8080
ENTRYPOINT ["/server"]