"The following command runs an
ubuntu container, attaches interactively to your local command-line session, and runs
/bin/bash," reads the official Docker starter guide.
docker run -it ubuntu /bin/bash
docker run -it ubuntu /bin/bash # List files inside of the Docker container root@642064598df6:/ ls # bin dev home lib32 libx32 mnt proc run srv tmp var # boot etc lib lib64 media opt root sbin sys usr # Print the current directory root@642064598df6:/ pwd # / # Exit the instance root@642064598df6:/ exit # exit
Here's a summary from Docker's docs.
When you run this command, the following happens (assuming you are using the default registry configuration):
docker pull ubuntu).
docker container createcommand manually).
/bin/bash. Because the container is running interactively and attached to your terminal (due to the
-tflags), you can provide input using your keyboard while the output is logged to your terminal.
When you type
exit to terminate the
/bin/bash command, the container stops but is not removed. You can start it again or remove it.
If you don't want your container to persist after you
exit, you should use the
docker run -it --rm ubuntu /bin/bash
Here, you can see how you'd use a Docker container to run TensorFlow without having to install dependencies on your local machine.