Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid healthcheck removal? #647

Open
ammnt opened this issue Feb 26, 2024 · 3 comments
Open

How to avoid healthcheck removal? #647

ammnt opened this issue Feb 26, 2024 · 3 comments

Comments

@ammnt
Copy link

ammnt commented Feb 26, 2024

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

  1. Buld the image from this Dockerfile:
    https://github.com/ammnt/nginx/blob/65baf28845c2ad1ee412ab8f0c6259af0dc6c601/Dockerfile
  2. Slim the image :)
  3. Then run the container and see that healthcheck is gone :(
  4. 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)
@kcq
Copy link
Member

kcq commented Feb 28, 2024

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).

@kcq
Copy link
Member

kcq commented Apr 6, 2024

@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.

@ammnt
Copy link
Author

ammnt commented Apr 6, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants