# 工具 docker

**curl -sSL https://get.docker.com | sudo sh**

```
mkdir /srv/dev-disk-by-label-data/docker
rsync -avP /var/lib/docker/  /srv/dev-disk-by-label-data/docker/   
mv /var/lib/docker /var/lib/dockerbak
systemctl restart docker    
```

```
docker volume create portainer
cd /var/lib/docker/volumes/portainer/_data
docker run -d --privileged --name portainer -p 9900:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart=always -v portainer:/data portainer/portainer
```
