mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-19 08:45:27 +01:00
4a836ea975
health check url should depend on internal https Signed-off-by: DQ <dengq@vmware.com>
27 lines
1.1 KiB
Docker
27 lines
1.1 KiB
Docker
ARG harbor_base_image_version
|
|
FROM goharbor/harbor-trivy-adapter-base:${harbor_base_image_version}
|
|
|
|
ARG trivy_version
|
|
|
|
COPY ./make/photon/common/install_cert.sh /home/scanner
|
|
COPY ./make/photon/trivy-adapter/entrypoint.sh /home/scanner
|
|
COPY ./make/photon/trivy-adapter/binary/trivy /usr/local/bin/trivy
|
|
COPY ./make/photon/trivy-adapter/binary/scanner-trivy /home/scanner/bin/scanner-trivy
|
|
|
|
|
|
RUN chown -R scanner:scanner /etc/pki/tls/certs \
|
|
&& chown scanner:scanner /home/scanner/entrypoint.sh && chmod u+x /home/scanner/entrypoint.sh \
|
|
&& chown scanner:scanner /usr/local/bin/trivy && chmod u+x /usr/local/bin/trivy \
|
|
&& chown scanner:scanner /home/scanner/bin/scanner-trivy && chmod u+x /home/scanner/bin/scanner-trivy \
|
|
&& chown scanner:scanner /home/scanner/install_cert.sh && chmod u+x /home/scanner/install_cert.sh
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl --fail -s http://127.0.0.1:8080/probe/healthy || curl -k --fail -s https://127.0.0.1:8443/probe/healthy || exit 1
|
|
|
|
ENV TRIVY_VERSION=${trivy_version}
|
|
|
|
USER scanner
|
|
|
|
ENTRYPOINT ["/home/scanner/entrypoint.sh"]
|