This repository is PoC implementation of delta updating for containers.
D4C is in early development stage and more works are left.
D4C depends on the below software.
- go
- docker
- docker-squash
- containerd
- fuse3
For Ubuntu 22.04, install these packages.
sudo apt install -y docker-ce containerd.io golang-go fuse3
pip install docker-squash
D4C provides snapshotter plugin for containerd.
Configure containerd with install_snapshotter.sh
./install_snapshotter.sh
make all
mkdir images
sudo ./ctr-cli convert --image nginx:1.23.1 --output ./images/nginx-1.23.1 --cdimg
sudo ./ctr-cli convert --image nginx:1.23.2 --output ./images/nginx-1.23.2 --cdimg
sudo ./ctr-cli convert --image nginx:1.23.3 --output ./images/nginx-1.23.3 --cdimg
sudo ./ctr-cli convert --image nginx:1.23.4 --output ./images/nginx-1.23.4 --cdimg
./ctr-cli cdimg diff --oldCdimg ./images/nginx-1.23.1/image.cdimg --newCdimg ./images/nginx-1.23.2/image.cdimg --outCdimg ./images/diff_nginx-1.23.1-2.cdimg --threadNum 8
./ctr-cli cdimg diff --oldCdimg ./images/nginx-1.23.2/image.cdimg --newCdimg ./images/nginx-1.23.3/image.cdimg --outCdimg ./images/diff_nginx-1.23.2-3.cdimg --threadNum 8
./ctr-cli cdimg diff --oldCdimg ./images/nginx-1.23.3/image.cdimg --newCdimg ./images/nginx-1.23.4/image.cdimg --outCdimg ./images/diff_nginx-1.23.3-4.cdimg --threadNum 8
sudo ./snapshotter
sudo ./ctr-cli load --image d4c-nginx:1.23.1 --cdimg ./images/nginx-1.23.1/image.cdimg
sudo ./ctr-cli load --image d4c-nginx:1.23.2 --cdimg ./images/diff_nginx-1.23.1-2.cdimg
sudo ./ctr-cli load --image d4c-nginx:1.23.3 --cdimg ./images/diff_nginx-1.23.2-3.cdimg
sudo ./ctr-cli load --image d4c-nginx:1.23.4 --cdimg ./images/diff_nginx-1.23.3-4.cdimg
sudo ctr run --rm --snapshotter=di3fs --net-host d4c-nginx:1.23.4 test-nginx-1.23.4
./ctr-cli push --cdimg ./images/nginx-1.23.1/image.cdimg --imageTag d4c-nginx:1.23.1
./ctr-cli push --cdimg ./images/diff_nginx-1.23.1-2.cdimg
./ctr-cli push --cdimg ./images/diff_nginx-1.23.2-3.cdimg
./ctr-cli push --cdimg ./images/diff_nginx-1.23.3-4.cdimg --imageTag d4c-nginx:1.23.4
sudo ./ctr-cli pull --image d4c-nginx:1.23.1 --host localhost:8081
sudo ./ctr-cli pull --image d4c-nginx:1.23.4 --host localhost:8081