upaas/Dockerfile
user 478746c356 rebase: apply audit bug fixes on latest main
Rebased fix/1.0-audit-bugs onto current main (post-merge of PRs #119, #127).

Changes:
- Custom domain types: docker.ImageID, docker.ContainerID, webhook.UnparsedURL
- Type-safe function signatures throughout docker/deploy/webhook packages
- Remove docker-compose.yml, test helper files
- README and Dockerfile updates
- Prettier-formatted JS files
2026-02-23 11:56:09 -08:00

39 lines
725 B
Docker

# Build stage
FROM golang:1.25-alpine AS builder
RUN apk add --no-cache git make gcc musl-dev
# Install golangci-lint v2
RUN go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
RUN go install golang.org/x/tools/cmd/goimports@latest
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Run all checks - build fails if any check fails
RUN make check
# Build the binary
RUN make build
# Runtime stage
FROM alpine:3.19
RUN apk add --no-cache ca-certificates tzdata git openssh-client docker-cli
WORKDIR /app
COPY --from=builder /src/bin/upaasd /app/upaasd
# Create data directory
RUN mkdir -p /var/lib/upaas
ENV UPAAS_DATA_DIR=/var/lib/upaas
EXPOSE 8080
ENTRYPOINT ["/app/upaasd"]