BusyBox wget in alpine doesn't support -I flag, healthcheck was failing with 'unrecognized option' and Docker reported container as unhealthy despite nginx working correctly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
10 lines
219 B
Docker
10 lines
219 B
Docker
# syntax=docker/dockerfile:1.7
|
|
FROM nginx:1.27-alpine
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
|
CMD wget -q --spider http://127.0.0.1:8080/ || exit 1
|