What do I need to do to deploy a docker container running on the App Platform?

I get the following error:

Error: error resolving dockerfile path: please provide a valid path to a Dockerfile within the build context with –dockerfile

Do I need to enter any build commands?

Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

You can deploy a docker container on the App Platform by placing a Dockerfile (named Dockerfile) in the root of the Github repository for your app.

If you want to store your Dockerfile in a different location in your repository, you can use the dockerfile_path key in your app spec.

You can see a <a href=“https://www.digitalocean.com/docs/app-platform/languages-frameworks/docker/”>sample</a> setup for deploying a Dockerfile to App Platform. Even with a repo setup like this, with a Dockerfile at the root, you still need to create an actual App on the App Platform pointing to his repo– the easiest way is via the Apps web UI.

  • Thanks for replying… I have a Dockerfile in the root, it’s just a simple Nginx instance serving a React app. On deployment of the app I was getting the error mentioned. I thought maybe some addtional configuration was required.

    Thanks!

Deploying a containerized web application
Table of contents.
Objectives.
Before you begin. Option A: Use Cloud Shell. Option B: Use command-line tools locally.
Step 1: Build the container image.
Step 2: Run your container locally (optional)
Step 3: Push the Docker image to Container Registry.
Step 4: Create a GKE cluster.
Step 5: Deploy the sample app to GKE.

Submit an Answer