An ember-cli-deploy plugin to build a docker image and upload it to a repository (Docker hub)
What is an ember-cli-deploy plugin?
A plugin is an addon that can be executed as a part of the ember-cli-deploy pipeline. A plugin will implement one or more of the ember-cli-deploy's pipeline hooks. This plugin will be executed on the 'upload' hook.
This component is part of the rewrite of the frontend-app for my job at easyPEP/staffomatic.
- easyPEP (german name): homepage
- Staffomatic (english name): homepage
- easyPEP github
For more information on what plugins are and how they work, please refer to the Plugin Documentation.
To get up and running quickly, do the following:
- Ensure you are logged in with your docker cli: docs
- Ensure ember-cli-deploy-build is installed and configured.
- Ensure ember-cli-deploy-revision-data is installed and configured.
- Install this plugin
$ ember install ember-cli-deploy-docker-hub
- Place the following configuration into
ENV"docker-hub" =repository: 'company/repository' // requireddockerFilePath: 'docker/Dockerfile' // default 'Dockerfile'
- Run the pipeline
$ ember deploy
For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.
The name of your repository at Docker hub.
The path to your Dockerfile relative to your project root.
What does the plugin do?
ember-cli-deploy-docker-hub builds your image once with the
ember-cli-deploy-revision-data as a tag and once with the
$ docker build -f 'dockerFilePath' -t repository:123456 .;$ docker build -f 'dockerFilePath' -t repository:latest .;
Then it simply pushes the images to docker hub.
$ docker push repository:123456;$ docker push repository:latest;
When does the plugin execute?
Activation occurs during the
upload hook of the pipeline.
- I don't know how to test this yet. So yes, sadly there are no tests yet.
- Try this out with other repository hosters.
- Configure which deploy hook triggers the plugin