Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
Platform: RK3328/RK3399/RK3568/RK3588
Operating System: Debian 10, Debian 11
The recommended storage driver for Docker now is Overlay2. However, it may not be possible to install it directly if the root file system is already using OverlayFS. In that case, some adjustments need to be made to the partitions. There are several methods available and we will introduce them separately below. Please choose one according to your needs:
Precautions:
sudo passwd root # Create a password for the root user if it hasn't been done before. su - root -c 'echo "overlayfs=disable" > /.init_wipedata' sudo reboot
sudo apt update sudo apt install parted export DEV=/dev/mmcblkX #needs to be changed to the real device sudo parted -s ${DEV} unit MiB print
sudo apt update sudo apt install parted fdisk export DEV=/dev/mmcblkX #needs to be changed to the real device sudo parted -s ${DEV} unit MiB print
Here, 8GB is used as an example. The partition size can be adjusted according to your needs:
sudo passwd root # Create a password for the root user su - root -c 'echo "overlayfs=enable userdata=8096" > /.init_wipedata' sudo reboot
After reboot, confirm that the partition has been adjusted and you can see that the userdata partition is now 8GB:
export DEV=/dev/mmcblkX #needs to be changed to the real device sudo parted -s ${DEV} unit MiB print
(echo n; echo ""; echo ""; echo ""; echo w) | sudo fdisk ${DEV} NUM=$(sudo parted ${DEV} print | awk 'NF > 1 {p = $1} END {print p}') # Get the index of the last partition sudo mkfs.ext4 ${DEV}p${NUM}
sudo mkdir /var/lib/docker sudo blkid ${DEV}p${NUM} # Configure automatic mounting sudo vi /etc/fstab # Add the following content to the end of the file (where UUID needs to be replaced with the actual one). UUID=2efab5a5-8b74-41d2-8747-4c00fff8514a /var/lib/docker ext4 suid,dev,exec,auto,nouser,async,noatime,nofail 0 0 # Enter the following command to mount the partition: sudo mount /var/lib/docker
[ -f /usr/sbin/iptables-legacy ] && sudo update-alternatives --set iptables /usr/sbin/iptables-legacy [ -f /usr/sbin/ip6tables-legacy ] && sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo apt install lsb-release wget codename=$(lsb_release -c | awk '{print $2}') version=$(lsb_release -sr | cut -d'.' -f1) wget https://download.docker.com/linux/debian/dists/${codename}/pool/stable/arm64/containerd.io_1.6.9-1_arm64.deb wget https://download.docker.com/linux/debian/dists/${codename}/pool/stable/arm64/docker-ce-cli_23.0.1-1~debian.${version}~${codename}_arm64.deb wget https://download.docker.com/linux/debian/dists/${codename}/pool/stable/arm64/docker-buildx-plugin_0.10.2-1~debian.${version}~${codename}_arm64.deb wget https://download.docker.com/linux/debian/dists/${codename}/pool/stable/arm64/docker-ce_23.0.1-1~debian.${version}~${codename}_arm64.deb wget https://download.docker.com/linux/debian/dists/${codename}/pool/stable/arm64/docker-compose-plugin_2.6.0~debian-${codename}_arm64.deb sudo dpkg -i ./containerd.io_1.6.9-1_arm64.deb \ ./docker-ce_23.0.1-1~debian.${version}~${codename}_arm64.deb \ ./docker-ce-cli_23.0.1-1~debian.${version}~${codename}_arm64.deb \ ./docker-buildx-plugin_0.10.2-1~debian.${version}~${codename}_arm64.deb \ ./docker-compose-plugin_2.6.0~debian-${codename}_arm64.deb
Verify if Docker has been installed successfully:
sudo docker info
Check if it is using the overlay2 storage driver.:
$ sudo docker info | grep storage -i Storage Driver: overlay2
sudo groupadd docker sudo gpasswd -a ${USER} docker sudo systemctl restart docker sudo chmod a+rw /var/run/docker.sock
Let’s verify:
docker images
mkdir ~/nextcloud -p docker run -d -p 8888:80 --name nextcloud -v ~/nextcloud/:/var/www/html/ --restart=always --privileged=true arm64v8/nextcloud
After installation, visit: http://device-ip-address:8888/ on your computer browser to view the nextcloud web page.
https://docs.docker.com/engine/install/debian/#install-from-a-package