Creating a Docker Registry
Creating a docker registry is rather straightforward, but you may need to do some tweaking of your docker installation in order to get it working as indicated below.
Let’s assume that you already have docker up and running on your machine.
We are going to set up a Docker registry on our local server. This server will not have a secure connection and will only be used internally, so we will need to allow this access by creating a file in /etc/docker called daemon.json to designate this:
Build, Tag, and Push a Docker Image with One Command
You can build, tag, and push a docker image to a remote all in one command with the –quiet parameter on docker build, which only outputs the SHA256 hash (annoyingly prefixed with SHA256:, but nothing a little cutting can’t fix).
$ docker tag $(docker build . -q | cut -c 8-999) myregid/imagename:1.0.1 && docker push myregid/imagename