mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-19 08:44:14 +00:00
45 lines
1.2 KiB
Docker
45 lines
1.2 KiB
Docker
# Build stage
|
|
FROM golang:1.24-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy go mod files
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the hold service
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o atcr-hold ./cmd/hold
|
|
|
|
# Runtime stage
|
|
FROM alpine:latest
|
|
|
|
RUN apk --no-cache add ca-certificates
|
|
|
|
WORKDIR /root/
|
|
|
|
# Copy binary from builder
|
|
COPY --from=builder /app/atcr-hold .
|
|
|
|
# Create directories for storage
|
|
RUN mkdir -p /var/lib/atcr/hold
|
|
|
|
# Expose default port
|
|
EXPOSE 8080
|
|
|
|
# OCI image annotations
|
|
LABEL org.opencontainers.image.title="ATCR Hold Service" \
|
|
org.opencontainers.image.description="ATCR Hold Service - Bring Your Own Storage component for ATCR" \
|
|
org.opencontainers.image.authors="ATCR Contributors" \
|
|
org.opencontainers.image.source="https://tangled.org/@evan.jarrett.net/at-container-registry" \
|
|
org.opencontainers.image.documentation="https://tangled.org/@evan.jarrett.net/at-container-registry" \
|
|
org.opencontainers.image.licenses="MIT" \
|
|
org.opencontainers.image.version="0.1.0" \
|
|
io.atcr.icon="https://imgs.blue/evan.jarrett.net/1TpTOdtS60GdJWBYEqtK22y688jajbQ9a5kbYRFtwuqrkBAE"
|
|
|
|
# Run the hold service
|
|
ENTRYPOINT ["./atcr-hold"]
|
|
CMD ["/etc/atcr/hold.yml"]
|