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-adapter-base:${harbor_base_image_version}
|
2019-10-17 06:00:51 +02:00
|
|
|
|
2020-02-14 14:11:52 +01:00
|
|
|
COPY ./make/photon/common/install_cert.sh /home/clair-adapter
|
|
|
|
COPY ./make/photon/clair-adapter/entrypoint.sh /home/clair-adapter
|
2019-10-17 06:00:51 +02:00
|
|
|
COPY ./make/photon/clair-adapter/binary/harbor-scanner-clair /clair-adapter/clair-adapter
|
|
|
|
|
2020-02-14 14:11:52 +01:00
|
|
|
RUN chown -R clair-adapter:clair-adapter /etc/pki/tls/certs \
|
|
|
|
&& chown -R clair-adapter:clair-adapter /clair-adapter && chmod u+x /clair-adapter/clair-adapter \
|
|
|
|
&& chown clair-adapter:clair-adapter /home/clair-adapter/entrypoint.sh && chmod u+x /home/clair-adapter/entrypoint.sh \
|
|
|
|
&& chown clair-adapter:clair-adapter /home/clair-adapter/install_cert.sh && chmod u+x /home/clair-adapter/install_cert.sh
|
2019-10-17 06:00:51 +02:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
2019-10-26 19:25:36 +02:00
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -sS 127.0.0.1:8080/probe/healthy || exit 1
|
2019-10-17 06:00:51 +02:00
|
|
|
|
|
|
|
USER clair-adapter
|
|
|
|
|
2020-02-14 14:11:52 +01:00
|
|
|
ENTRYPOINT ["/home/clair-adapter/entrypoint.sh"]
|