mirror of https://github.com/01-edu/public.git
Xavier Petit
5 years ago
3 changed files with 23 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||||||
|
[Unit] |
||||||
|
Description=Docker relocation |
||||||
|
Before=docker.service |
||||||
|
|
||||||
|
[Service] |
||||||
|
ExecStart=/usr/local/bin/mount-docker.sh |
||||||
|
Type=oneshot |
||||||
|
|
||||||
|
[Install] |
||||||
|
RequiredBy=docker.service |
@ -0,0 +1,10 @@ |
|||||||
|
#!/usr/bin/env bash |
||||||
|
|
||||||
|
# Unofficial Bash Strict Mode |
||||||
|
set -euo pipefail |
||||||
|
IFS=' |
||||||
|
' |
||||||
|
|
||||||
|
cp -a /var/lib/docker /tmp |
||||||
|
mount -t tmpfs -osize=2G tmpfs /var/lib/docker |
||||||
|
mv /tmp/docker/* /var/lib/docker |
Loading…
Reference in new issue