Why can't I access my environment variables at build time when building from a Dockerfile on App Platform?

Validated on 22 May 2023 • Last edited on 2 Jul 2024

If you are using a Dockerfile to deploy your app on App Platform, environment variables are only available at build time if you have set them using the --build-arg option in Docker before deploying the app.

For example, to access the variable EXAMPLE=your-value during build time, set it in the image using the docker CLI like this:

docker build --build-arg EXAMPLE=your-value

You cannot use this method to access bindable variables at build time. If you are supplying a Dockerfile, bindable variables are only available at runtime.

Why am I getting an error when trying to forward DigitalOcean Functions to Managed OpenSearch?

Functions does not support forwarding to Managed OpenSearch.

My container-based app fails to deploy without logs or error codes.

Troubleshoot by making sure the Dockerfile and its commands build on Linux AMD64 and other steps.

How do I generate my app's SSL certificate?

App Platform automatically generates and issues the SSL certificate during the configuration.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.