roles/docker: Install and set up Docker daemon
The *docker* role configures the Docker daemon on the managed machine.
This commit is contained in:
16
roles/docker/files/reset-docker-storage.sh
Normal file
16
roles/docker/files/reset-docker-storage.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
: ${DOCKER_SVC:=${1:-docker}}
|
||||
|
||||
|
||||
systemctl stop ${DOCKER_SVC} ${DOCKER_SVC}-storage-setup
|
||||
|
||||
docker_pool=$(/sbin/lvm lvs | awk '$1=="docker-pool"{printf "%s/%s\n",$2,$1}')
|
||||
if [ -n "${docker_pool}" ]; then
|
||||
/sbin/lvm lvchange -an "${docker_pool}"
|
||||
/sbin/lvm lvremove "${docker_pool}"
|
||||
fi
|
||||
|
||||
rm -f /etc/sysconfig/${DOCKER_SVC}-storage
|
||||
|
||||
find /var/lib/docker -mindepth 1 -delete
|
||||
Reference in New Issue
Block a user