diff options
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3405c1a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# --- Builder --- +FROM golang:alpine AS builder +WORKDIR /app +COPY go.mod 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"] |