Version: ubuntu-16.04-desktop-amd64.iso
Full record of Docker installation process
1. Uninstall the old version of docker, use the following command:
sudo apt-get remove docker docker-engine docker.io
2. Install Docker-CE
2.1 Set up warehouse
1. Update the index package, use the following command:
sudo apt-get update
2. Install the software package to allow access to the repository via HTTPS, use the following command:
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
3. Add the official docker GPG key and use the following command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. To set up a stable warehouse, use the following command:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
2.2 Install Docker-CE
1. Update the package index, use the following command
sudo apt-get update
2. Install the default version of DOCKER CE, use the following command
sudo apt-get install docker-ce
3. Test, use the following command
docker run hello-world
If an error occurs, use the following command:
sudo docker run hello-world
Some problems and solutions using sudo:
Solution, enter the following code to force unlock:
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
However, the following error occurred:
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success
'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli;
then appstreamcli refresh > /dev/null;
fi'
E: Sub-process returned an error code
Solution, enter the following three lines of code, and then execute sudo apt-get update
sudo pkill -KILL appstreamcli
wget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb
sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb
Reference link: