smtp4dev
smtp4dev copied to clipboard
Docker healthckeck mechanism
I ran into an issue where my container healthcheck is no longer working because curl is not on the image.
# docker-compose.yml
...
smtpstub:
image: rnwood/smtp4dev:3.1.1
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:80']
...
curl may have gone for a while, but i must have only now noticed after pulling a newer version.
i need the healthcheck to make sure smtp4dev is running before running any tests.
my current workaround is to simply to pin an older version, but that is not a real solution.
I'm not very familiar with dotnet, so maybe im overlooking on obvious solution.