# Why am I receiving a "user does not exist" error when building my Docker app on App Platform? If your Docker App on App Platform fails to build with the following error in the [deployment logs](https://docs.digitalocean.com/products/app-platform/how-to/manage-deployments/index.html.md), 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` ```docker 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 [Why am I receiving an "invalid dockerfile_path" error when building my Docker app on App Platform?](https://docs.digitalocean.com/support/why-am-i-receiving-an-invalid-dockerfile_path-error-when-building-my-docker-app-on-app-platform/index.html.md): Ensure your Dockerfile’s path is correctly defined using the `dockerfile_path` parameter in your app spec file. [How do I fix the error "Record is managed by an App on this account, and cannot be deleted"?](https://docs.digitalocean.com/support/how-do-i-fix-the-error-record-is-managed-by-an-app-on-this-account-and-cannot-be-deleted/index.html.md): 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?](https://docs.digitalocean.com/support/why-do-i-get-the-error-javascript-heap-out-of-memory-during-deployment/index.html.md): Increase the heap memory by setting the environment variable NODE\_OPTIONS=–max-old-space-size=4096.