Browse Source

Copy Docker data to Rootfs

master
Mayank 5 years ago
parent
commit
8cb0a4bb91
No known key found for this signature in database GPG Key ID: D037D60476CE748C
  1. 24
      stage2/05-docker-compose/01-run.sh

24
stage2/05-docker-compose/01-run.sh

@ -33,6 +33,23 @@ echo "Docker stuff installed!"
echo "Bundling Docker images required to run Umbrel services"
echo "Removing Docker"
docker ps
docker images -a
du -sh /var/lib/docker/overlay2
sudo systemctl stop docker
sudo apt-get purge docker-ce docker-ce-cli containerd.io moby-engine moby-cli
sudo rm -rf /var/lib/docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
docker --version
docker ps
docker images -a
sudo rm -rf /etc/docker/daemon.json
echo '{"experimental": true}' | sudo tee -a /etc/docker/daemon.json
wget -q "https://raw.githubusercontent.com/getumbrel/umbrel-compose/master/docker-compose.yml"
IMAGES=$(grep '^\s*image' docker-compose.yml | sed 's/image://' | sed 's/\"//g' | sed '/^$/d;s/[[:blank:]]//g' | sort | uniq)
echo "List of images to download: $IMAGES"
@ -41,6 +58,7 @@ while IFS= read -r image; do
docker pull --platform=linux/arm/v7 $image
done <<< "$IMAGES"
docker save $IMAGES | gzip > umbrel-docker-images.tar.gz
du -h umbrel-docker-images.tar.gz
cp umbrel-docker-images.tar.gz ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/umbrel-docker-images.tar.gz
# docker save $IMAGES | gzip > umbrel-docker-images.tar.gz
# du -h umbrel-docker-images.tar.gz
rsync -avPHSX /var/lib/docker ${ROOTFS_DIR}/var/lib/docker/
# cp umbrel-docker-images.tar.gz ${ROOTFS_DIR}/home/${FIRST_USER_NAME}/umbrel-docker-images.tar.gz
Loading…
Cancel
Save