In your Dockerfile, the USER instruction needs to be after the FROM and WORKDIR instructions.
Why am I receiving an "invalid dockerfile_path" error when building my Docker app on App Platform?
Validated on 2 Jul 2024 • Last edited on 3 Jul 2024
When building your Docker app on App Platform, an Invalid dockerfile_path, no such file exists in the git repository error occurs when your dockerfile_path is not correctly defined in your Application Specification (app spec) file.
By default, the dockerfile_path value is set to the file Dockerfile in the root of the repository:
name: sample-dockerfile
services:
- name: web
git:
repo_clone_url: https://github.com/digitalocean/sample-dockerfile.git
branch: main
dockerfile_path: DockerfileIf your Dockerfile is located in a specific directory in your repository, update your app spec to use your Dockerfile’s exact location as the dockerfile_path value. To update your app spec, in the DigitalOcean Control Panel, select the app you want to update its app spec for, then click the Settings tab. In the App Spec section, click Edit, then update the app spec in the control panel:
name: sample-dockerfile
services:
- name: web
git:
repo_clone_url: https://github.com/digitalocean/sample-dockerfile.git
branch: main
dockerfile_path: <your-folder>/DockerfileAfter you’ve added the correct path to your dockerfile_path parameter, click Save to update the app spec which automatically redeploys your Docker app.
Related Topics
Delete the existing dev database and create a new one. Then make sure that the app deployment completes successfully.
You cannot add the same domain name to multiple apps or split an app and domain name across more than one account.