forked from jc21/docker-registry-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
66 lines (52 loc) · 1.85 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM casjaysdevdocker/nodejs as build
ARG LICENSE="WTFPL" \
IMAGE_NAME="docker-registry-ui" \
TIMEZONE="America/New_York" \
LICENSE="MIT" \
NODE_ENV="production" \
PORT="80"
ENV SHELL=/bin/bash \
TERM=xterm-256color \
HOSTNAME=${HOSTNAME:-casjaysdev-$IMAGE_NAME} \
TZ=$TIMEZONE \
NODE_ENV=$NODE_ENV \
NODE_MANAGER="fnm" \
NODE_VERSION=8
RUN apk update -U --no-cache
COPY ./bin/. /usr/local/bin/
COPY ./config/. /config/
COPY ./data/. /data/
WORKDIR /app
COPY ./app/. /app/
ADD ./LICENSE.md /app/
RUN mkdir -p /bin/ /config/ /data/ && \
rm -Rf /bin/.gitkeep /config/.gitkeep /data/.gitkeep && \
setup_node "$NODE_VERSION"
RUN eval "$(fnm env --shell bash)" && \
fnm install $NODE_VERSION && \
npm i
FROM scratch
ARG BUILD_DATE="2022-10-07 20:08" \
BUILD_VERSION="latest"
LABEL org.label-schema.name="docker-registry-ui" \
org.label-schema.description="Containerized version of docker-registry-ui" \
org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/docker-registry-ui" \
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/docker-registry-ui" \
org.label-schema.build-date="$BUILD_VERSION" \
org.label-schema.version="$BUILD_VERSION" \
org.label-schema.vcs-ref="$BUILD_VERSION" \
org.label-schema.license="$LICENSE" \
org.label-schema.vcs-type="Git" \
org.label-schema.schema-version="$BUILD_VERSION" \
org.label-schema.vendor="CasjaysDev" \
maintainer="CasjaysDev <docker-admin@casjaysdev.pro>"
ENV SHELL="/bin/bash" \
TERM="xterm-256color" \
HOSTNAME="casjaysdev-docker-registry-ui" \
TZ="${TZ:-America/New_York}"
VOLUME ["/config","/data"]
EXPOSE $PORT
COPY --from=build /. /
ENTRYPOINT [ "tini", "--" ]
CMD [ "/usr/local/bin/entrypoint-docker-registry-ui.sh" ]
HEALTHCHECK --start-period=1m --interval=2m --timeout=3s CMD [ "/usr/local/bin/entrypoint-docker-registry-ui.sh", "healthcheck" ]