Skip to content

Instantly share code, notes, and snippets.

@cblunt
Last active May 21, 2025 12:49
Show Gist options
  • Save cblunt/a000fd6d4b2c24d4bc4270338ee25bfa to your computer and use it in GitHub Desktop.
Save cblunt/a000fd6d4b2c24d4bc4270338ee25bfa to your computer and use it in GitHub Desktop.
Dockerfile to create a simple nginx healthcheck container that responds to /up
FROM nginx
RUN <<EOF
echo "server {
listen 80;
server_name localhost;
location /up {
default_type text/plain;
return 200 "OK";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}" > /etc/nginx/conf.d/default.conf
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment