This wercker step allows to build a project as a Docker image and push the image created in a Docker registry.
This step must be used with a wercker box built with Docker Support.
To build and push a Docker image, the Wercker step follow this steps :
Step 1 : Building image
The following configuration allows to setup this step :
image
(required): Image to push to the registrypath
(optional): The build context path. By default: .
Step 2 : Tagging image
The following configuration allows to setup this step :
tags
(optional): A comma separated list of tags. Each tagged images will be pushed. By default: latest
Step 3 : Pushing image(s)
The following configuration allows to setup this step :
registry
(optional) Docker registry server, if no server is specified "https://index.docker.io/v1/" is the default.username
(required) Username needed to login to the Docker registrypassword
(required) Password needed to login to the Docker registryemail
(required) Email needed to login to the Docker registry
The following example build and push a docker image to a private Docker registry :
deploy:
steps:
...
- nhuray/docker:
image: myimage
tags: ${WERCKER_GIT_COMMIT:0:7},latest
registry: tutum.co
email: [email protected]
password: *****
username: nhuray