Push image to Docker Hub.
- Parameters
-
image | Image 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