mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
www/ only contains gitignored content (www/jp/) so it doesn't exist in the CI checkout, causing the Docker build to fail.
29 lines
520 B
Docker
29 lines
520 B
Docker
# Build stage
|
|
FROM golang:1.25-alpine3.21 AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -o erupe-ce .
|
|
|
|
# Runtime stage
|
|
FROM alpine:3.21
|
|
|
|
RUN adduser -D -h /app erupe
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /build/erupe-ce .
|
|
COPY --from=builder /build/schemas/ ./schemas/
|
|
|
|
# www/ and bin/ are mounted at runtime if needed
|
|
|
|
# bin/ and savedata/ are mounted at runtime via docker-compose
|
|
# config.json is also mounted at runtime
|
|
|
|
USER erupe
|
|
|
|
ENTRYPOINT ["./erupe-ce"]
|