Skip to content

Deploy from Dockerfile

If you have only your service and a Dockerfile, this page will help you deploy it successfully to Docker Deploy.

Note that a Dockerfile and a Docker Compose file are not the same thing. Here you have more info about them.

Pre-requirements

To be able to deploy your app, your will first need the following:

  1. An app that runs.
  2. A Dockerfile that builds your image properly
  3. An account on Docker Deploy
  4. The Docker Deploy CLI

If something in this list is missing, go fix/get it first and then come back!

Build and deploy the app

Open a terminal in the directory where your Dockerfile is located.
Once there, run dd-cli build. This command build your image and pushes it to your private registry in Docker Deploy.

After building the image, run dd-cli deploy to deploy your app. This command deploys your app and listens to the port 80 in your container, you can edit this configuration in the dashboard.

Add other services to your deployment

If your app needs a DB or some other service to work, you can edit its Compose file in the dashboard and add the missing services by hand. You can check our templates to get inspired.

Something went wrong?

If something didn’t work as expected, just get in contact to get help.