2018-10-18 05:03:28 +02:00
|
|
|
FROM photon:2.0
|
2017-07-24 11:19:32 +02:00
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
LABEL maintainer="wangyan@vmware.com"
|
2017-07-24 11:19:32 +02:00
|
|
|
|
|
|
|
# The original script in the docker offical registry image.
|
2018-10-18 05:03:28 +02:00
|
|
|
RUN tdnf install sudo -y >> /dev/null\
|
2017-11-02 04:51:32 +01:00
|
|
|
&& tdnf clean all \
|
2019-05-05 09:24:52 +02:00
|
|
|
&& mkdir -p /etc/registry \
|
2019-10-13 12:27:06 +02:00
|
|
|
&& groupadd -r -g 10000 harbor && useradd --no-log-init -m -g 10000 -u 10000 harbor
|
2018-11-09 08:02:59 +01:00
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
COPY ./make/photon/common/install_cert.sh /home/harbor
|
|
|
|
COPY ./make/photon/registry/entrypoint.sh /home/harbor
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/registry/binary/registry /usr/bin
|
2019-05-05 09:24:52 +02:00
|
|
|
|
2019-10-22 15:24:49 +02:00
|
|
|
RUN chown -R harbor:harbor /etc/pki/tls/certs \
|
2019-10-13 12:27:06 +02:00
|
|
|
&& chown harbor:harbor /home/harbor/entrypoint.sh && chmod u+x /home/harbor/entrypoint.sh \
|
|
|
|
&& chown harbor:harbor /home/harbor/install_cert.sh && chmod u+x /home/harbor/install_cert.sh \
|
|
|
|
&& chown harbor:harbor /usr/bin/registry && chmod u+x /usr/bin/registry
|
2017-07-24 11:19:32 +02:00
|
|
|
|
2017-11-02 04:51:32 +01:00
|
|
|
HEALTHCHECK CMD curl 127.0.0.1:5000/
|
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
USER harbor
|
|
|
|
|
|
|
|
ENTRYPOINT ["/home/harbor/entrypoint.sh"]
|
|
|
|
|
2017-07-24 11:19:32 +02:00
|
|
|
VOLUME ["/var/lib/registry"]
|
|
|
|
EXPOSE 5000
|