Use custom docker registry

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Using docker since 2013 allows you to use custom docker registries with the docker pull and push commands. Just add the registry location to the repository name.

It will look like my.registry.address:port/repository_name. Following example illustrates my recent usage. Before we can push to a repository it must be tagged. Find the images with:

[root@localhost fo-elasticsearch-curator]# docker images | grep curator | grep 4.2.5
frontoffice/es-curator   4.2.5               be06e3ba93ab        40 minutes ago      103.9 MB

Tag it like this:

[root@localhost fo-elasticsearch-curator]# docker tag be06e3ba93ab artifactory.cinhtau.net/frontoffice/es-curator:4.2.5

If you don’t use a version (4.2.5) in tag, it will become latest. You can also do multiple tags:

[root@localhost fo-elasticsearch-curator]# docker tag be06e3ba93ab artifactory.cinhtau.net/frontoffice/es-curator:4.2.5
[root@localhost fo-elasticsearch-curator]# docker tag be06e3ba93abartifactory.cinhtau.net/frontoffice/es-curator:latest

Now you are ready to push:

[root@localhost fo-elasticsearch-curator]# docker push artifactory.cinhtau.net/frontoffice/es-curator:4.2.5
The push refers to a repository [artifactory.cinhtau.net/frontoffice/es-curator]
db35aa2d9103: Pushed
c53b2bda49da: Pushed
d0a52e0c52ff: Pushed
cf16c8a484e6: Pushed
9e8d827bd66e: Pushed
ae9ff5adae09: Pushed
cde1526b53e0: Pushed
513678dc07f5: Pushed
874b7daf5cb3: Pushed
2613530126e7: Pushed
cc318934a479: Pushed
c9fc143a069a: Pushed
011b303988d2: Pushed
latest: digest: sha256:2202206bb6e2b038849c382fffcb0ae769736bc7429d47c751f35b4a0991d0fd size: 3038

On the docker daemon host you can pull or run it directly.

# docker pull artifactory.cinhtau.net/frontoffice/es-curator:4.2.5
# docker run -d -v /var/log/docker/curator:/var/log/curator --name=es-curator artifactory.cinhtau.net/frontoffice/es-curator:4.2.5
Please remember the terms for blog comments.