This plugin enables you to specify a registry for Dokku to pull an image from, and then deploy it to an app.
The goal is to streamline the deployment process for container images. For instance, in a CI job that builds an image and pushes it to a registry.
dokku plugin:install https://github.com/yurihs/dokku-deploy-from-registry.git deploy-from-registry
First, set the remote image repo for an app, like so:
dokku deploy-from-registry:set-remote-image-repo some-app registry.example.com/my-org/my-app
Then you can run
dokku deploy-from-registry some-app a1b2c3
to pull the a1b2c3
tag and deploy it. After confirming that it works,
you can stick that command in your CI pipeline as a simple,
one-command deploy solution.
Bonus: use dokku-acl
to restrict access to the deploy command.
Put deploy-from-registry
in your DOKKU_ACL_PER_APP_COMMANDS
environment variable,
and you should be good.
deploy-from-registry <app> <tag> pull and deploy
deploy-from-registry:get-remote-image-repo <app> get image repo
deploy-from-registry:set-remote-image-repo <app> <repo> set image repo to pull from
deploy-from-registry:unset-remote-image-repo <app> unset image repo
The code is mostly glued together from the following projects. Their copyrights are listed in the license file.
- Dokku core tags plugin: scheduler tag creation trigger
- dokku-registry plugin: image pull handling, plugin config manager