Skip to content

add health check to dockerfiles #4346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions anax-in-container/Dockerfile.alpine.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@ ADD hzn /usr/bin/
WORKDIR /root
COPY script/anax.service /root/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

# You can add a 2nd arg to this on the docker run cmd or the CMD statement in another dockerfile, to configure a specific environment
ENTRYPOINT ["/root/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-container/Dockerfile.ubi.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ ADD hzn /usr/bin/
WORKDIR /root
COPY script/anax.service /root/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

# You can add a 2nd arg to this on the docker run cmd or the CMD statement in another dockerfile, to configure a specific environment
ENTRYPOINT ["/root/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-container/Dockerfile.ubi.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ ADD hzn /usr/bin/
WORKDIR /root
COPY script/anax.service /root/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

# You can add a 2nd arg to this on the docker run cmd or the CMD statement in another dockerfile, to configure a specific environment
ENTRYPOINT ["/root/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-container/Dockerfile.ubi.ppc64el
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ ADD hzn /usr/bin/
WORKDIR /root
COPY script/anax.service /root/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

# You can add a 2nd arg to this on the docker run cmd or the CMD statement in another dockerfile, to configure a specific environment
ENTRYPOINT ["/root/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-container/Dockerfile.ubi.s390x
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,7 @@ ADD hzn /usr/bin/
WORKDIR /root
COPY script/anax.service /root/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

# You can add a 2nd arg to this on the docker run cmd or the CMD statement in another dockerfile, to configure a specific environment
ENTRYPOINT ["/root/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-container/Dockerfile_agbot.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ USER agbotuser
WORKDIR /home/agbotuser
RUN mkdir -p /home/agbotuser/policy.d

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8046/status > /dev/null || exit 1

# Run the application
ENTRYPOINT /usr/horizon/bin/agbot_start.sh
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ USER agentuser
WORKDIR /home/agentuser
RUN mkdir -p /home/agentuser/policy.d

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

ENTRYPOINT ["/home/agentuser/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ USER agentuser
WORKDIR /home/agentuser
RUN mkdir -p /home/agentuser/policy.d

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

ENTRYPOINT ["/home/agentuser/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.auto-upgrade-cron.amd64
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ RUN chown -R cronjobuser:cronjobuser /usr/local/bin/auto-upgrade-cronjob.sh /tmp

USER cronjobuser
RUN chmod 755 /usr/local/bin/auto-upgrade-cronjob.sh

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD true
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.auto-upgrade-cron.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ RUN chown -R cronjobuser:cronjobuser /usr/local/bin/auto-upgrade-cronjob.sh /tmp

USER cronjobuser
RUN chmod 755 /usr/local/bin/auto-upgrade-cronjob.sh

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD true
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.auto-upgrade-cron.ppc64el
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ RUN chown -R cronjobuser:cronjobuser /usr/local/bin/auto-upgrade-cronjob.sh /tmp

USER cronjobuser
RUN chmod 755 /usr/local/bin/auto-upgrade-cronjob.sh

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD true
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.auto-upgrade-cron.s390x
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ RUN chown -R cronjobuser:cronjobuser /usr/local/bin/auto-upgrade-cronjob.sh /tmp

USER cronjobuser
RUN chmod 755 /usr/local/bin/auto-upgrade-cronjob.sh

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD true
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.ppc64el
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ USER agentuser
WORKDIR /home/agentuser
RUN mkdir -p /home/agentuser/policy.d

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

ENTRYPOINT ["/home/agentuser/anax.service", "start"]
2 changes: 2 additions & 0 deletions anax-in-k8s/Dockerfile.ubi.s390x
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ USER agentuser
WORKDIR /home/agentuser
RUN mkdir -p /home/agentuser/policy.d

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD curl -sf http://localhost:8510/status > /dev/null || exit 1

ENTRYPOINT ["/home/agentuser/anax.service", "start"]
3 changes: 3 additions & 0 deletions css/image/cloud-sync-service-amd64/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,7 @@ COPY script/css_start.sh /usr/edge-sync-service/bin

USER cssuser

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD grep -q css_start.sh /proc/1/cmdline || exit 1

CMD ["/usr/edge-sync-service/bin/css_start.sh"]

2 changes: 2 additions & 0 deletions css/image/cloud-sync-service-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ RUN apk --no-cache add libcrypto1.0 libssl1.0 ca-certificates

ADD cloud-sync-service /cloud-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD grep -q css_start.sh /proc/1/cmdline || exit 1

CMD ["/cloud-sync-service/cloud-sync-service"]

2 changes: 2 additions & 0 deletions css/image/cloud-sync-service-armhf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ RUN apk --no-cache add libcrypto1.0 libssl1.0 ca-certificates

ADD cloud-sync-service /cloud-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD grep -q css_start.sh /proc/1/cmdline || exit 1

CMD ["/cloud-sync-service/cloud-sync-service"]

3 changes: 3 additions & 0 deletions ess/image/edge-sync-service-amd64/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ COPY LICENSE.txt /licenses

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]

3 changes: 3 additions & 0 deletions ess/image/edge-sync-service-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ RUN apk --no-cache add libcrypto1.0 libssl1.0 ca-certificates

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]


2 changes: 2 additions & 0 deletions ess/image/edge-sync-service-arm64/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ COPY LICENSE.txt /licenses

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]
3 changes: 3 additions & 0 deletions ess/image/edge-sync-service-armhf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ RUN apk --no-cache add libcrypto1.0 libssl1.0 ca-certificates

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]


3 changes: 3 additions & 0 deletions ess/image/edge-sync-service-ppc64el/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ COPY LICENSE.txt /licenses

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]

3 changes: 3 additions & 0 deletions ess/image/edge-sync-service-ppc64el/Dockerfile.ubi.old
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ RUN apk --no-cache add libcrypto1.0 libssl1.0 ca-certificates

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]


2 changes: 2 additions & 0 deletions ess/image/edge-sync-service-s390x/Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ COPY LICENSE.txt /licenses

ADD edge-sync-service /edge-sync-service/

HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 CMD pgrep -f edge-sync-service > /dev/null || exit 1

CMD ["/edge-sync-service/edge-sync-service"]