2018-10-18 05:03:28 +02:00
|
|
|
FROM photon:2.0
|
2018-07-16 10:50:28 +02:00
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
Label maintainer="wangyan@vmware.com"
|
2018-07-16 10:50:28 +02:00
|
|
|
|
2019-05-05 09:24:52 +02:00
|
|
|
RUN tdnf install sudo -y >> /dev/null \
|
2018-07-16 10:50:28 +02:00
|
|
|
&& tdnf clean all \
|
2019-10-13 12:27:06 +02:00
|
|
|
&& groupadd -r -g 10000 harbor && useradd --no-log-init -m -g 10000 -u 10000 harbor \
|
|
|
|
&& mkdir -p /etc/registry
|
2018-07-16 10:50:28 +02:00
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
COPY ./make/photon/common/install_cert.sh /home/harbor
|
2018-07-16 10:50:28 +02:00
|
|
|
COPY ./make/photon/registry/binary/registry /usr/bin
|
2019-10-13 12:27:06 +02:00
|
|
|
COPY ./make/photon/registryctl/start.sh /home/harbor
|
|
|
|
COPY ./make/photon/registryctl/harbor_registryctl /home/harbor
|
2018-07-16 10:50:28 +02:00
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
RUN chmod -R 777 /etc/pki/tls/certs \
|
|
|
|
&& chown harbor:harbor /home/harbor/harbor_registryctl && chmod u+x /home/harbor/harbor_registryctl \
|
|
|
|
&& chown harbor:harbor /usr/bin/registry && chmod u+x /usr/bin/registry \
|
|
|
|
&& chown harbor:harbor /home/harbor/start.sh && chmod u+x /home/harbor/start.sh \
|
|
|
|
&& chown harbor:harbor /home/harbor/install_cert.sh && chmod u+x /home/harbor/install_cert.sh
|
2018-07-16 10:50:28 +02:00
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
|
|
|
|
HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080/api/health || exit 1
|
2018-07-16 10:50:28 +02:00
|
|
|
|
|
|
|
VOLUME ["/var/lib/registry"]
|
|
|
|
|
2019-10-13 12:27:06 +02:00
|
|
|
ENTRYPOINT ["/home/harbor/start.sh"]
|
|
|
|
|
|
|
|
USER harbor
|