This tutorial is contributed by Hatef Monajemi (@monajemi)
The following tutorial is intended to familiarize you with building docker images and using them.
Table of Contents
What is Docker
How to build a Docker image
Using Docker
- To see a list of your local docker images:
docker images
- To get into a docker image (say
riccardomurri/elasticluster
) that may have a different entrypoint that bashdocker run -it --entrypoint /bin/bash riccardomurri/elasticluster
- To see a list of your containers:
docker ps -a
- To reattach your exited container:
docker start <IMAGE_ID> docker attach <IMAGE_ID>
or simply,
docker start -a -i <IMAGE_ID>
This is a great command to remember, since you may exit your terminal, but this command allows you to start the exited containers and attach to the terminal again.