From b0154400742e33941cbdb8271504af3c50153ff0 Mon Sep 17 00:00:00 2001 From: DQ Date: Wed, 22 Jul 2020 23:51:08 +0800 Subject: [PATCH] Remove expose port in dockerfiles The export is dynamical now because of introduce of internal TLS Signed-off-by: DQ --- make/photon/chartserver/Dockerfile | 1 - make/photon/clair-adapter/Dockerfile | 2 -- make/photon/clair/Dockerfile | 2 -- make/photon/db/Dockerfile | 1 - make/photon/log/Dockerfile | 2 -- make/photon/nginx/Dockerfile | 2 -- make/photon/redis/Dockerfile | 1 - make/photon/registry/Dockerfile | 1 - make/photon/trivy-adapter/Dockerfile | 2 -- 9 files changed, 14 deletions(-) diff --git a/make/photon/chartserver/Dockerfile b/make/photon/chartserver/Dockerfile index f10ca9ed9..c0c5b6a04 100644 --- a/make/photon/chartserver/Dockerfile +++ b/make/photon/chartserver/Dockerfile @@ -19,6 +19,5 @@ WORKDIR /home/chart ENTRYPOINT ["./docker-entrypoint.sh"] VOLUME ["/chart_storage"] -EXPOSE 9999 HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -sS http://127.0.0.1:9999/health || curl -k -sS https://127.0.0.1:9443/health || exit 1 diff --git a/make/photon/clair-adapter/Dockerfile b/make/photon/clair-adapter/Dockerfile index c72c1c28b..3e40537de 100644 --- a/make/photon/clair-adapter/Dockerfile +++ b/make/photon/clair-adapter/Dockerfile @@ -11,8 +11,6 @@ RUN chown -R clair-adapter:clair-adapter /etc/pki/tls/certs \ && 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 -EXPOSE 8080 - HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -sS http://127.0.0.1:8080/probe/healthy || curl -k -sS https://127.0.0.1:8443/probe/healthy || exit 1 USER clair-adapter diff --git a/make/photon/clair/Dockerfile b/make/photon/clair/Dockerfile index da4ea0efc..374b2dfbe 100644 --- a/make/photon/clair/Dockerfile +++ b/make/photon/clair/Dockerfile @@ -9,8 +9,6 @@ COPY ./make/photon/common/install_cert.sh /home/clair/ VOLUME /config -EXPOSE 6060 6061 - RUN chown -R clair:clair /etc/pki/tls/certs && chown -R clair:clair /home/clair \ && chmod u+x /home/clair/clair \ && chmod u+x /home/clair/docker-entrypoint.sh \ diff --git a/make/photon/db/Dockerfile b/make/photon/db/Dockerfile index 2e0bd46bc..077c676f6 100644 --- a/make/photon/db/Dockerfile +++ b/make/photon/db/Dockerfile @@ -15,5 +15,4 @@ RUN chown -R postgres:postgres /docker-entrypoint.sh /docker-healthcheck.sh /doc ENTRYPOINT ["/docker-entrypoint.sh"] HEALTHCHECK CMD ["/docker-healthcheck.sh"] -EXPOSE 5432 USER postgres diff --git a/make/photon/log/Dockerfile b/make/photon/log/Dockerfile index da9719b8d..e7a70aa24 100644 --- a/make/photon/log/Dockerfile +++ b/make/photon/log/Dockerfile @@ -23,6 +23,4 @@ HEALTHCHECK CMD netstat -ltun|grep 10514 VOLUME /var/log/docker/ /run/ /etc/logrotate.d/ -EXPOSE 10514 - CMD /usr/local/bin/start.sh diff --git a/make/photon/nginx/Dockerfile b/make/photon/nginx/Dockerfile index 457c9dd5b..7bba7f503 100644 --- a/make/photon/nginx/Dockerfile +++ b/make/photon/nginx/Dockerfile @@ -4,8 +4,6 @@ FROM ${harbor_base_namespace}/harbor-nginx-base:${harbor_base_image_version} VOLUME /var/cache/nginx /var/log/nginx /run -EXPOSE 8080 - STOPSIGNAL SIGQUIT HEALTHCHECK CMD curl --fail -s http://127.0.0.1:8080 || exit 1 diff --git a/make/photon/redis/Dockerfile b/make/photon/redis/Dockerfile index 18eae16cb..a2a782f77 100644 --- a/make/photon/redis/Dockerfile +++ b/make/photon/redis/Dockerfile @@ -11,5 +11,4 @@ RUN chmod +x /usr/bin/docker-healthcheck \ HEALTHCHECK CMD ["docker-healthcheck"] USER redis -EXPOSE 6379 CMD ["redis-server", "/etc/redis.conf"] diff --git a/make/photon/registry/Dockerfile b/make/photon/registry/Dockerfile index c86c798a1..8e4165fb7 100644 --- a/make/photon/registry/Dockerfile +++ b/make/photon/registry/Dockerfile @@ -18,4 +18,3 @@ USER harbor ENTRYPOINT ["/home/harbor/entrypoint.sh"] VOLUME ["/storage"] -EXPOSE 5000 diff --git a/make/photon/trivy-adapter/Dockerfile b/make/photon/trivy-adapter/Dockerfile index 4cda2297e..bb0414328 100644 --- a/make/photon/trivy-adapter/Dockerfile +++ b/make/photon/trivy-adapter/Dockerfile @@ -16,8 +16,6 @@ RUN chown -R scanner:scanner /etc/pki/tls/certs \ && 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}