docker --version
docker info
docker container ls
docker container ls --all # see stopped containers also
docker container ls --all -q # see stopped containers; get the id only
docker container ls -aq # see stopped containers; get the id only
docker images # see what is available
docker image ls # see what is available
docker rmi <image id> # remove an image
docker ps # see what is running
docker ps -a # see everything, even stopped containers
docker ps -a -q # get just the container IDs for all jobs
docker create # "stage" a container (then `start` it)
docker stop # stop a container
docker kill # kill a container
docker start # start a container
docker restart # restart a container
docker rm # remove the container (can't `restart` it then)
docker stop $(docker ps -q) # stop all containers
docker rm $(docker ps -a -q) # remove all stopped containers
First we map 8888 (Jupyter notebook) on the "inside" to 5000 on the "outside" and run the image containing TensorFlow:
docker run -it -v "$PWD":/mnist -p 5000:8888 b.gcr.io/tensorflow/tensorflow:latest-devel
(This also maps the current directory to a mount in the docker container.)
Then, we launch ipython notebook
inside the image. Next, we get the correct
host IP address with:
docker-machine ls
This will provide a URL, e.g. tcp://192.168.XYZ.XYZ:ABCD
. Point a browser to
192.168.XYZ.XYZ:5000
and we will see the notebook.
e.g., the iqsharp
container:
docker login
docker tag iqsharp gnperdue/iqsharp
docker push gnperdue/iqsharp
docker pull gnperdue/kubia