Docker image commands
How to build and manage docker images

docker image ls -a
# build image according to current directory's Dockerfile
docker build -t "$image" .
# delete a specific image
docker image rm "$image"
# delete all images not used by at least 1 container
docker image prune -f
# important : does not work on pseudo-TTY, it is thus impossible to login through SSH
# authenticating to a docker registry requires a real TTY and direct access to the machine
docker login
# username is mandatory to avoid collision with similarly named images
docker tag "$image" username/repository:tag
# username is mandatory to avoid collision with similarly named images
docker push username/repository:tag
# pull image locally
docker pull "$image"
# pull image and run CMD/ENTRYPOINT Dockerfile directive
docker container run username/repository:tag