Table of Contents

Docker: Image Development

General Information

Developing docker images.

Checklist


Building/Testing Images


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

Push Images To Docker Registry

Login to registry


Tag a local image:tag with the destination image:tag (usually tag is a version number)


Push the image:tag to the remote registry


Additional tag with latest (so the most recent version number is also a latest tag)


Additional push for latest


Run Container From Registry

Login to registry


Run container interactively with a bash shell (latest tag is default)