[Docker] docker安装与程序运行
安装Docker与程序运行
1. requirements.txt
Problem:
Downloading https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting futures==3.2.0 (from -r requirements.txt (line 8))
Could not find a version that satisfies the requirement futures==3.2.0 (from -r requirements.txt (line 8)) (from versions: 0.2.python3, 0.1, 0.2, 1.0, 2.0, 2.1, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.2.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1)
No matching distribution found for futures==3.2.0 (from -r requirements.txt (line 8))
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Solution:
futures==3.2.0 => futures==3.1.1
2. Install Docker CE for Ubuntu
https://docs.docker.com/install/linux/docker-ce/ubuntu/
3. Problem:
write /var/lib/docker/tmp/GetImageBlob891597147: no space left on device
Solution:
sudo apt-get autoclean # 删除你已经卸载掉的软件包的命令为
sudo apt-get clean # 若你想清理出更多的空间,可以把电脑上存储的安装包全部卸载
sudo apt-get autoremove # 删除已经被卸载的软件所依赖的(其他软件不依赖的)孤立的软件包
空间仍不足:通过建立软链接将/var目录下占用空间较大的目录移动到富足的空间区块(如/home)下,使得/var下不再占用空间。 (具体实现)
mv /var/cache /home/lsy #将var下的cache目录移动到home或者其他空间富足的区块中
ln -s /home/lsy/cache /var #/var/cache指向/home/lsy/cache,这样cache目录将不再占用/var目录的空间
mv /var/lib/docker /home/lsy
ln -s /home/lsy/docker /var/lib
service docker stop
service docker start
一定要重启docker,否则会出现
OCI runtime create failed: /var/lib/docker/overlay2/c6eb60dada971e57fd5d125fb61d294870be347a2efb287862f8dfe52d99c57b/merged is not an absolute path or is a symlink: unknown