Ensure your Dockerfile’s path is correctly defined using the dockerfile_path
parameter in your app spec file.
Why am I receiving a "user does not exist" error when building my Docker app on App Platform?
Validated on 10 Jul 2024 • Last edited on 17 Apr 2025
If your Docker App on App Platform fails to build with the following error in the deployment logs, then the USER
instruction may be in the wrong place in your Dockerfile:
error building image: error building stage: failed to execute command: identifying uid and gid for user app: user app is not a uid and does not exist on the system
In a Dockerfile, each instruction builds on the state created by the previous instructions. If the USER
instruction is before a FROM
or WORKDIR
instruction, the FROM
and WORKDIR
instruction fail to execute because the user ID doesn’t exist in the base image or work directory yet.
To fix this, make sure the line with the USER
instruction is after the lines with the FROM
and WORKDIR
instructions in your Dockerfile:
Dockerfile
FROM example-image:latest AS base
WORKDIR /example/dir
USER example-user
EXPOSE 80
After you update the Dockerfile in your repository, your Docker app automatically redeploys on App Platform.
Related Topics
Your app may have crashed while trying to receive an upload or return a response larger than it has been configured to manage.
Your team balance may be past due. Pay your balance to lift restrictions on actions you can take on the platform.