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

Last verified 6 Nov 2026

If you are using a Dockerfile to deploy your app on App Platform, define environment variables with scope set to BUILD_TIME or RUN_AND_BUILD_TIME. App Platform passes those variables to the Docker build as build arguments.

To access a build-time variable in your Dockerfile, declare it with ARG before you use it:

ARG EXAMPLE
RUN echo "$EXAMPLE"

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.

How do I fix the error "Record is managed by an App on this account, and cannot be deleted"?

Use the app’s Settings tab to remove domains associated with App Platform apps.

Why do I get the error "JavaScript heap out of memory" during deployment?

Increase the heap memory by setting the environment variable NODE_OPTIONS=–max-old-space-size=4096.

How do I fix a "permission denied for schema public" error in my dev database?

Delete the existing dev database and create a new one. Then make sure that the app deployment completes successfully.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.