By Philippe
CTO
I’m currently trying to port my webapp from heroku to App Platform, and I’m struggling to use env variable set in the App Platform UI in my docker build phase. Any idea? Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can pass the values of environment variables from the host to your containers without much effort. Simply don’t specify a value in the command line, and make sure that the environment variable is named the same as the variable the containerized app expects:
$ docker run -e var_name (…) In the above snippet, the value of a var_name variable in the current environment is used to set the value of var_name in the container environment upon startup.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.