summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: 81ca291ba0d2ef625c30d2764c214bfa7fdb1145 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# --- Builder ---
FROM golang:alpine AS builder
WORKDIR /app
COPY go.mod go.sum main.go ./
COPY registry ./registry
COPY web ./web
RUN CGO_ENABLED=0 go build -o registry-browser .

# --- Final Container ---
FROM alpine:3.21

RUN addgroup -S registry && adduser -S registry -G registry

WORKDIR /app

COPY --from=builder --chown=registry:registry /app/registry-browser /usr/local/bin/registry-browser
COPY templates ./templates
COPY assets ./assets

USER registry

EXPOSE 8080

CMD ["registry-browser", "--http=0.0.0.0:8080"]