Skip to content

Instantly share code, notes, and snippets.

@aodin
Created May 4, 2026 22:19
Show Gist options
  • Select an option

  • Save aodin/6761a8a48015d867907a960e612ea850 to your computer and use it in GitHub Desktop.

Select an option

Save aodin/6761a8a48015d867907a960e612ea850 to your computer and use it in GitHub Desktop.
Dockerfile for testing health checks, returns 500 on /health
FROM nginx:alpine
RUN echo '<h1>Health Check Test</h1>' > /usr/share/nginx/html/index.html
RUN sed -i '/location \/ {/i\ location /health { return 500; }' /etc/nginx/conf.d/default.conf
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment