2018-10-18 05:03:28 +02:00
|
|
|
FROM photon:2.0
|
2017-07-24 11:19:32 +02:00
|
|
|
|
|
|
|
MAINTAINER wangyan@vmware.com
|
|
|
|
|
|
|
|
# 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 \
|
2018-11-09 08:02:59 +01:00
|
|
|
&& mkdir /harbor/ \
|
|
|
|
&& groupadd -r -g 10000 harbor && useradd --no-log-init -r -g 10000 -u 10000 harbor
|
|
|
|
|
|
|
|
COPY ./make/photon/common/install_cert.sh /harbor
|
2017-11-02 04:51:32 +01:00
|
|
|
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/registry/entrypoint.sh /
|
2017-07-24 11:19:32 +02:00
|
|
|
RUN chmod u+x /entrypoint.sh
|
|
|
|
|
2017-11-02 04:51:32 +01:00
|
|
|
RUN mkdir -p /etc/registry
|
2017-08-30 10:13:54 +02:00
|
|
|
|
2018-09-03 11:40:26 +02:00
|
|
|
COPY ./make/photon/registry/binary/registry /usr/bin
|
2017-07-24 11:19:32 +02:00
|
|
|
RUN chmod u+x /usr/bin/registry
|
|
|
|
|
2017-11-02 04:51:32 +01:00
|
|
|
HEALTHCHECK CMD curl 127.0.0.1:5000/
|
|
|
|
|
2017-07-24 11:19:32 +02:00
|
|
|
VOLUME ["/var/lib/registry"]
|
|
|
|
EXPOSE 5000
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
2018-10-18 05:03:28 +02:00
|
|
|
CMD ["/etc/registry/config.yml"]
|