mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-09-23 19:09:13 +00:00
28 lines
543 B
Docker
28 lines
543 B
Docker
FROM golang:1.22.3-alpine3.19 as builder
|
|
|
|
RUN apk update && \
|
|
apk add ca-certificates git bash gcc musl-dev
|
|
|
|
WORKDIR /opt/src
|
|
ADD events events
|
|
ADD registry registry
|
|
ADD *.go go.mod go.sum ./
|
|
|
|
RUN go test -v ./registry && \
|
|
go build -o /opt/registry-ui *.go
|
|
|
|
|
|
FROM alpine:3.19
|
|
|
|
WORKDIR /opt
|
|
RUN apk add --no-cache ca-certificates tzdata && \
|
|
mkdir /opt/data && \
|
|
chown nobody /opt/data
|
|
|
|
ADD templates /opt/templates
|
|
ADD static /opt/static
|
|
COPY --from=builder /opt/registry-ui /opt/
|
|
|
|
USER nobody
|
|
ENTRYPOINT ["/opt/registry-ui"]
|