General Information
Developing docker images.
Checklist
Build a docker image from a Dockerfile (mytag is usually a version number)
docker build -t myimagename:mytag --file=Dockerfile .
Run a container with an interactive terminal, remove it when stopped, attach a bash shell
docker run -it --rm --name mycontainername myimagename /bin/bash
Login to registry
docker login -u dockerhubuser
docker login -u myuserhere https://registryhostname.my.domain.com
Tag a local image:tag with the destination image:tag (usually tag is a version number)
docker tag myimage:mytag dockerhubuser/myimage:mytag
docker tag myimage:mytag registryhostname.my.domain.com/myimage:mytag
Push the image:tag to the remote registry
docker push dockerhubuser/myimage:mytag
docker push registryhostname.my.domain.com/myimage:mytag
Additional tag with latest (so the most recent version number is also a latest tag)
docker tag myimage:mytag dockerhubuser/myimage:latest
docker tag myimage:mytag registryhostname.my.domain.com/myimage:latest
Additional push for latest
docker push dockerhubuser/myimage:latest
docker push registryhostname.my.domain.com/myimage:latest
Login to registry
docker login -u dockerhubuser
docker login -u myuserhere https://registryhostname.my.domain.com
Run container interactively with a bash shell (latest tag is default)
docker run -it --name mycontainername dockerhubuser/myimage /bin/bash
docker run -it --name mycontainername registryhostname.my.domain.com/myimage /bin/bash