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: Dockerfile

If 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>/Dockerfile

After you’ve added the correct path to your dockerfile_path parameter, click Save to update the app spec which automatically redeploys your Docker app.

Why am I receiving a "user does not exist" error when building my Docker app on App Platform?

In your Dockerfile, the USER instruction needs to be after the FROM and WORKDIR instructions.

Why am I receiving 520 status codes from my app?

Your app may have crashed while trying to receive an upload or return a response larger than it has been configured to manage.

Why am I receiving a forbidden error when making changes to my App Platform app?

Your team balance may be past due. Pay your balance to lift restrictions on actions you can take on the platform.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.