Docker及其Docker.io debian pakcage目前无法使用:
Package 'docker.io' has no installation candidate
安装docker
的最简单方法是使用get.docker.com脚本:
首先,安装curl
工具:
# apt-get install curl
下载并运行get.docker.com脚本:
# curl -sSL https://get.docker.com/| sh + sh -c sleep 3; apt-get update Get:1 http://debian.mirror.uber.com.au jessie InRelease [214 kB] ... Processing triggers for libc-bin (2.19-13) ... + sh -c docker version Client version: 1.6.0 Client API version: 1.18 Go version (client): go1.4.2 Git commit (client): 4749651 OS/Arch (client): linux/amd64 Server version: 1.6.0 Server API version: 1.18 Go version (server): go1.4.2 Git commit (server): 4749651 OS/Arch (server): linux/amd64 If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker your-user Remember that you will have to log out and back in for this to take effect!
通过创建Ubuntu Docker容器来测试Docker安装:
# docker run -i -t ubuntu /bin/bash Unable to find image 'ubuntu:latest' locally latest: Pulling from ubuntu 511136ea3c5a: Pull complete f3c84ac3a053: Pull complete a1a958a24818: Pull complete 9fec74352904: Pull complete d0955f21bf24: Already exists Digest: sha256:7b27f7cc97d4c94fdebb2cf99ddaadd0e8fc8ec4aed2cf56a8ee8fe7dc2ec4a4 Status: Downloaded newer image for ubuntu:latest root@f3e5b3b575bd:/# cat /etc/issue Ubuntu 14.04.2 LTS \n \l
日期:2020-07-07 20:56:52 来源:oir作者:oir