ARG REPO_LOCATION
# ARG BASE_VERSION

FROM ${REPO_LOCATION}minideb-node AS builder

RUN install_packages git ca-certificates

RUN git clone https://github.com/Joxit/docker-registry-ui.git /srv
WORKDIR /srv
RUN npm install --loglevel=warn

###############################################################################

FROM ${REPO_LOCATION}minideb
# FROM ${REPO_LOCATION}minideb:${BASE_VERSION}

COPY --from=builder /srv/dist /srv

RUN install_packages busybox

USER 3:3

WORKDIR /srv
ENTRYPOINT /bin/busybox httpd -f -p 5500