-
Notifications
You must be signed in to change notification settings - Fork 19
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
[BUG] x-elbv2 throws validation error using environment variable to set Service port #778
Comments
This actually seems more broad than just the port. Attempts to use environment variables almost anywhere a number is expected, results in an error, like the following: ...
healthcheck: # https://docs.docker.com/reference/dockerfile/#healthcheck
test: ["CMD", "netcat", "-vz", "localhost", "8000"]
interval: "${WEB_HEALTHCHECK_INTERVAL}"
timeout: "${WEB_HEALTHCHECK_TIMEOUT}"
retries: "${WEB_HEALTHCHECK_RETRIES}"
start_period: "${WEB_HEALTHCHECK_START_PERIOD}"
|
Hello @dfrank-a |
@dfrank-a WRT to your specific issue, I see two issues there. One is that, an environment variable is always interpreted as a string by the OS. So there would need to be a way to render it as int, or string in the config. But also in your example config you have quotations, so even if it was an int, the quotes would render it as a string. retries: "${WEB_HEALTHCHECK_RETRIES}" I am a noob here, so I could be wrong :) PS: |
Using
docker run
and the latest image, the relevant snippet of my docker-compose file is:And
.env
containing:The text was updated successfully, but these errors were encountered: