2019-11-12 04:20:54 +01:00
|
|
|
ARG harbor_base_image_version
|
2019-11-11 11:56:36 +01:00
|
|
|
FROM goharbor/harbor-clair-base:${harbor_base_image_version}
|
2017-07-11 06:00:44 +02:00
|
|
|
|
2019-10-14 12:25:11 +02:00
|
|
|
COPY ./make/photon/clair/binary/clair /home/clair/
|
|
|
|
COPY ./make/photon/clair/docker-entrypoint.sh /home/clair/
|
|
|
|
COPY ./make/photon/clair/dumb-init /home/clair/
|
|
|
|
COPY ./make/photon/common/install_cert.sh /home/clair/
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-07-11 06:00:44 +02:00
|
|
|
VOLUME /config
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
EXPOSE 6060 6061
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2019-10-22 15:24:49 +02:00
|
|
|
RUN chown -R clair:clair /etc/pki/tls/certs \
|
2019-10-14 12:25:11 +02:00
|
|
|
&& chown -R clair:clair /home/clair \
|
|
|
|
&& chmod u+x /home/clair/clair \
|
|
|
|
&& chmod u+x /home/clair/docker-entrypoint.sh \
|
|
|
|
&& chmod +x /home/clair/dumb-init
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2017-11-03 11:06:27 +01:00
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -sS 127.0.0.1:6061/health || exit 1
|
2017-11-16 07:02:09 +01:00
|
|
|
|
2019-10-14 12:25:11 +02:00
|
|
|
WORKDIR /home/clair
|
|
|
|
USER clair
|
|
|
|
ENTRYPOINT ["./docker-entrypoint.sh"]
|