1. Installation of Docker
( "Installing Docker" here is actually installing Docker Engine)
$ sudo apt-get intasll Docker.io
- Note:apt-get is a management tool for Ubuntu installation software
2. Verify that the Docker engine is installed successfully
# Check that you have a working install
$ sudo docker info
3. Download an image (Download a pre-built image)
# Download an Ubuntu image
$ sudo docker pull Ubuntu
- Ubuntu is the name of the image, and you can search for the desired image in the Docker hub
4. Running an interactive shell
$ sudo docker run-it ubuntu/bin/bash
- -I flag starts an interactive container.
- -T flag creates a pseudo-tty that attaches and
stdin
stdout
5. Save a volume container as an image
- If the changes to Docker are not software installed with Jupyter, but only some packages are installed, then saving the new image requires only
sudo docker commit Containerid newimagename
- Containerid is the ID of the container to be saved
- Newimagename is the name of the new image, such as the name Ting/caffe:version1, where Version1 is the flag of the new container, which can be used to identify the version information of the new image
6. Enter the running container
exec-it c18652dcc369 Bash
Here's
Docker installation and ease of use