-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (27 loc) · 1.04 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
FROM alpine:3
LABEL name="registry-webui"
LABEL description="docker registry webui in onefile"
LABEL maintainer="[email protected]"
###############################################################################
# INSTALLATION
###############################################################################
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
# RUN echo "I'm building for $TARGETPLATFORM $TARGETOS $TARGETARCH"
ARG TZ=Asia/Shanghai
# set timezone
RUN apk add --no-cache tzdata
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# set workdir
ENV WORKDIR /var/www/registry-webui
# add executable by target architecture
ADD --chmod=755 main_linux_${TARGETARCH} $WORKDIR/main
RUN mkdir ${WORKDIR}/config
###############################################################################
# START
###############################################################################
WORKDIR $WORKDIR
ENTRYPOINT [ "./main" ]
CMD ["--config", "./config/default.yml"]