This plugin builds and pushes a container image to a container registry. For more information on docker please refer to Docker's Website.
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.
For more information on plugins refer to the Plugin Documentation.
Run the following command in your terminal:
ember install ember-cli-deploy-docker
The following properties are expected to be present on the deployment context
object:
distDir
(provided by ember-cli-deploy-build)project.root
(provided by ember-cli-deploy)revisionKey
(provided by ember-cli-deploy-revision-data)
The plugin also assumes that the user is logged into their container registry through their terminal. The upload hook will cause the pipeline to abort otherwise. Run the command & docker login images.yourdomain.com to be authenticated.
For detailed information on what plugin hooks are and how they work, please refer to the Plugin Documentation.
configure
didPrepare
upload
These hooks are flexible. Feel free to make changes to this plugin's index.js if different hooks are preferred. However if you are using the default name configurations, please make sure that revision-data plugin is installed and that it executes before the docker plugin.
For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.
Make sure all of the properties below are correctly configured, otherwise the pipline will abort
The default behavior for name is to use the revision key from the ember-cli-deploy-revision-data plugin. If an alternative naming scheme is preferred simply set the name in your main ember project's config/deploy.js.
This is the url of the container registry you wish to push to.
This is the location of the project that you want to build a container image from
An example of a completed config:
ENV["docker"] = {
name: 'newImage!',
repo:'images.company.com/something/something',
pathToProject:'/path/to/project',
}