ember-cli-deploy-docker-hub

0.0.2 • Public • Published

ember-cli-deploy-docker-hub

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.

For more information on what plugins are and how they work, please refer to the Plugin Documentation.

Quick Start

To get up and running quickly, do the following:

$ ember install ember-cli-deploy-docker-hub
  • Place the following configuration into config/deploy.js
ENV["docker-hub"] = {
    repository:     'company/repository', // required
    dockerFilePath: 'docker/Dockerfile' // default 'Dockerfile'
}
  • Run the pipeline
$ ember deploy

Configuration Options

For detailed information on how configuration of plugins works, please refer to the Plugin Documentation.

repository

The name of your repository at Docker hub.

Default: undefined

dockerFilePath

The path to your Dockerfile relative to your project root.

Default: Dockerfile

What does the plugin do?

ember-cli-deploy-docker-hub builds your image once with the revisionKey from ember-cli-deploy-revision-data as a tag and once with the latest tag. Equivalent to:

$ 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.

TODO

  • 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

Package Sidebar

Install

npm i ember-cli-deploy-docker-hub

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

7.38 kB

Total Files

6

Last publish

Collaborators

  • gerrit_sommer