Files
tueem cc3996b384
build / Go-Build (push) Successful in 1m25s
docker / docker (push) Successful in 4m9s
fix(docker): add ca-certificates to docker
2026-06-24 14:48:11 +02:00

27 lines
716 B
Docker

# Frontend build stage
FROM node:22-alpine AS frontend-builder
WORKDIR /app
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ .
RUN npm run build
# Build stage
FROM golang:latest AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY --from=frontend-builder /app/dist ./frontend/dist
RUN CGO_ENABLED=0 GOOS=linux go build -v -o outfit-voting-abi26 ./cmd/
# Final stage
FROM debian:bookworm-slim
WORKDIR /root/
EXPOSE 4000
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/outfit-voting-abi26 /usr/local/bin/outfit-voting-abi26
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]