Commands
Last updated
Last updated
docker pull <image>:latest
. The tag latest
is not required. Clone the container appropriate for your use case, for eg., use centos
for the latest version of CentOS. CentOS and most other linux operating systems are available as official repositories from the .
To use non-official docker images, you need to add the organisation before the docker image, for example to pull the latest version of tensorflow
: docker pull tensorflow/tensorflow:latest
The docker image can be used directly from the Docker Hub
To launch the centos
docker container, run docker run -ti tensorflow/tensorflow:latest /bin/bash
docker run -ti -v /home/<user>/<mounted-folder>/:/<path-in-container> cbgeo/cb-geo:latest
docker exec -ti <containerid> /bin/bash
docker start <containerid>
docker stop <containerid>
docker rm <containerid>
, stop the container before deleting it.
To delete all docker containers docker rm $(docker ps -a -q)
To connect to a particular port (for e.g., 3000) in docker container to port 3000
in localhost:
docker run -ti -p 3000:3000 tensorflow/tensorflow
Launching docker as root user: docker exec -u 0 -ti <containerid> /bin/bash
To build an image from docker file run as root docker build -t "tensorflow/tensorflow" /path/to/Dockerfile
docker history
will show you the effect of each command has on the overall size of the file.