healthcheck: use bash /dev/tcp instead of nc (not available in image)

This commit is contained in:
Alejandro Martinez
2026-04-12 12:28:08 +02:00
parent d11873a1d5
commit db25e6ce4b

View File

@@ -1,5 +1,5 @@
FROM mitmproxy/mitmproxy:latest
EXPOSE 8888 8081
HEALTHCHECK --interval=10s --timeout=5s --retries=10 --start-period=30s \
CMD nc -z localhost 8081 || exit 1
CMD bash -c 'echo > /dev/tcp/localhost/8081' || exit 1
ENTRYPOINT ["mitmweb", "--web-host", "0.0.0.0", "--web-port", "8081", "-p", "8888", "--ssl-insecure", "--set", "web_open_browser=false", "--set", "web_password=mitm"]