How do I pass environment variables to Docker containers?
Asked 07 September, 2021
Viewed 1.3K times
  • 56
Votes

I'm new to Docker, and it's unclear how to access an external database from a container. Is the best way to hard-code in the connection string?

# Dockerfile
ENV DATABASE_URL amazon:rds/connection?string

14 Answer