How to avoid healthcheck removal?
Expected Behavior
Slim utility compresses the image, but at the same time leaves healthcheck and the necessary dependencies for it.
Actual Behavior
Slim utility removes healthcheck and required dependencies for it (nc etc.).
Steps to Reproduce the Problem
- Buld the image from this Dockerfile: https://github.com/ammnt/nginx/blob/65baf28845c2ad1ee412ab8f0c6259af0dc6c601/Dockerfile
- Slim the image :)
- Then run the container and see that healthcheck is gone :(
- Inspect the image with Dive and confirm that all packages are gone too :(
Specifications
- Version: slim version darwin/arm64|Transformer|1.40.11|latest|latest
- Platform: macOS 14.3.1 (M1, arm64)
it's a planned enhancement (hopefully in the next release... follow me on Github or Twitter to be notified when it's out). You can try to work around the current behavior using an 'exec' probe (with the --exec flag which you can use to invoke nc the same way the healthcheck instruction is configured).
@ammnt this should take care of the healthcheck problem: https://github.com/mintoolkit/mint/releases/tag/1.41.1 Give it a try and let me know if you still have problems there.
@kcq , awesome! Thank you so much! Can you explain me please how to use it with GitHub Actions? I can't find anything in documentation: https://github.com/ammnt/angie/blob/http3/.github/workflows/build.yml#L69