mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-09-18 07:38:46 +00:00
* Upgrade Go version to 1.13.7, alpine to 3.11 and other dependencies. * You can define timezone when running container by adding `TZ` env var, e.g. "-e TZ=America/Los_Angeles" (thanks to @gminog). * Fix initial ownership of /opt/data dir in Dockerfile.
28 lines
564 B
Docker
28 lines
564 B
Docker
FROM golang:1.13.7-alpine3.11 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/docker-registry-ui *.go
|
|
|
|
|
|
FROM alpine:3.11
|
|
|
|
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/docker-registry-ui /opt/
|
|
|
|
USER nobody
|
|
ENTRYPOINT ["/opt/docker-registry-ui"]
|