Skip to content

Instantly share code, notes, and snippets.



Last active Jan 13, 2017
What would you like to do?
Tagging Docker images and deploying with Dokku

Deploying Tags in Dokku

Dokku is an tiny open source PAAS. Pulling and tagging existing images isn't a directly supported feature inside Dokku, so you must use Docker to first pull a tag the image.

  • Use Docker to login to Docker Hub if the repo isn't public
$ sudo docker -u <dockerhub_username>

Note: -p is only used when passing the password in line

  • Pull the image from Docker Hub
$ sudo docker pull <organization/image_name>:<version_tag>
  • Dokku manages containers assuming the organization (the prepended name before the /) is dokku. You need to prepend your images with dokku/ after pulling and remove the organization or replace the second / with a -.
$ sudo docker tag <organization/image_name>:<version_tag> dokku/<organization>-<image_name>:<version_tag>
  • Dokku works in an app paradigm, instead of containers. First Dokku step is to create the new app (if this is the first deploy):
$ sudo dokku apps:create <app_name>

Note: Do not use / in the name of the app, use - instead if required.

  • Your Dokku tagged Docker images (from here on out, known as apps) should now be visible inside Dokku:
$ dokku tags <app_name>
  • You should now be able to deploy you application based on the tag you would like deployed.
$ sudo dokku tags:deploy <app_name> <version_tag>

Gotcha: Listen ports are specified by the image, you can change these at the image level or via Dokku's proxy sub-command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment