cd-ci-glue
Functions
Docker Hub

Functions

 dockerhub_push_image (image)
 Push image to Docker Hub. More...
 
 dockerhub_set_description (repository, filename)
 Set the image description on Docker Hub. More...
 

Detailed Description

Function Documentation

◆ dockerhub_push_image()

dockerhub_push_image ( image  )

Push image to Docker Hub.

Parameters
imageImage identifier to push (e.g. madworx/debian-archive:lenny).
Environment variables
DOCKER_USERNAME Valid username for Docker Hub.
DOCKER_PASSWORD Valid password for Docker Hub.

Pushes a docker image from the local machine to the Docker Hub repository, logging in using the $DOCKER_USERNAME and $DOCKER_PASSWORD environment variables. You need to have tagged this image beforehand. (i.e. docker tag)

Example
$ docker build -t madworx/debian-archive:lenny-04815d2 .
...perform testing of built docker image....
$ docker tag madworx/debian-archive:lenny-04815d2 madworx/debian-archive:lenny
$ dockerhub_push_image madworx/debian-archive:lenny

◆ dockerhub_set_description()

dockerhub_set_description ( repository  ,
filename   
)

Set the image description on Docker Hub.

Parameters
repositoryRepository name; e.g. madworx/docshell.
filenameFilename/path containing description; e.g. README.md.
Environment variables
DOCKER_USERNAME Valid username for Docker Hub.
DOCKER_PASSWORD Valid password for Docker Hub.
Example
$ git clone https://github.com/madworx/docshell
$ cd docshell
$ dockerhub_set_description madworx/docshell README.md