直接运行docker , 报错
doc@localhost:~$ docker
Command 'docker' not found, but can be installed with:
sudo snap install docker # version 18.06.1-ce, or
sudo apt install docker.io
See 'snap info docker' for additional versions.
看到安装提示了没有, so easy!
不过先看看docker有啥版本.
doc@localhost:~$ snap info docker
name: docker
summary: The docker app deployment mechanism
publisher: Docker, Inc (docker-inc)
contact: snappy-devel@lists.ubuntu.com
license: Apache-2.0
description: |
Docker for snappy.
This snap allows you to use the full capabilities of docker on snappy.
In order to use 'docker build', 'docker save' and 'docker load', you need to place your
dockerfile within $HOME. All files that you want docker to access to must be within this
path.
You may also use the 'docker-privilege' command to allow you to use 'docker run
--privileged'. Because docker is unencumbered on snappy, it is recommended that you follow
the Docker project's recommendations for using docker securely.
snap-id: sLCsFAO8PKM5Z0fAKNszUOX0YASjQfeZ
channels:
stable: 18.06.1-ce (321) 102MB -
candidate: 18.06.1-ce (321) 102MB -
beta: 18.06.1-ce (321) 102MB -
edge: 18.06.1-ce (321) 102MB -
17.09/stable: –
17.09/candidate: 17.09.1-ce (232) 44MB -
17.09/beta: 17.09.1-ce (232) 44MB -
17.09/edge: 17.09.1-ce (232) 44MB -
17.06/stable: 17.06.2-ce (179) 43MB -
17.06/candidate: 17.06.2-ce (179) 43MB -
17.06/beta: ↑
17.06/edge: 17.06.2-ce-1 (237) 44MB -
17.03/stable: 17.03.2-ce-1 (159) 42MB -
17.03/candidate: 17.03.2-ce-1 (159) 42MB -
17.03/beta: ↑
17.03/edge: 17.03.2-ce-1 (159) 42MB -
直接安装吧
doc@localhost:~$ sudo snap install docker
[sudo] password for doc:
docker 18.06.1-ce from Docker, Inc (docker-inc) installed
完