Last active
May 21, 2025 12:49
-
-
Save cblunt/a000fd6d4b2c24d4bc4270338ee25bfa to your computer and use it in GitHub Desktop.
Dockerfile to create a simple nginx healthcheck container that responds to /up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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