Files
Erupe/Dockerfile
Houmgaor 160130e464 refactor(docker): improve Docker setup and reduce image size
- Add multi-stage build to Dockerfile for smaller production image
- Move docker-compose.yml to project root for easier usage
- Flatten docker/init/setup.sh to docker/setup.sh
- Expand .dockerignore to exclude unnecessary files
- Remove deprecated version field from compose files
2026-02-01 23:49:52 +01:00

28 lines
415 B
Docker

# Build stage
FROM golang:1.25-alpine3.21 AS builder
ENV GO111MODULE=on
WORKDIR /app/erupe
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o erupe-ce .
# Runtime stage
FROM alpine:3.21
RUN apk --no-cache add ca-certificates tzdata
WORKDIR /app/erupe
COPY --from=builder /app/erupe/erupe-ce .
# Default command runs the compiled binary
CMD [ "./erupe-ce" ]