tooz 52 Posted March 10, 2023 #docker engine installation on tinker board r2.0 #OS: Debian 10 v.3.0.11 (kernel 4.4) #docker engine version: server 23.0.1 (updated/ easier way to install) sudo apt-get update sudo apt-get upgrade sudo apt-get remove -y docker docker-engine docker.io containerd runc sudo apt-get install ca-certificates curl sudo echo insecure >> $HOME/.curlrc curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo update-alternatives --set iptables /usr/sbin/iptables-legacy sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy #reboot the board so the new iptables/ ip6tables come effective sudo reboot now sudo usermod -aG docker $USER sudo docker run hello-world (a slightly outdate way to install) sudo apt-get update sudo apt-get upgrade sudo apt-get install ca-certificates curl gnupg lsb-release sudo mkdir -m 0755 -p /etc/apt/keyrings sudo echo insecure >> $HOME/.curlrc sudo echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://downlaod.docker.com/linux/debian stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | printf "%s\n" "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" | sudo tee /etc/apt/sources.list.d/docker.list curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo modprobe ip_tables sudo su echo ip_tables >> /etc/modules sudo update-alternatives --set iptables /usr/sbin/iptables-legacy sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ##result sudo docker run hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 04341b189be6: Pull complete Digest: sha256: Status: Downloaded newer image for hello-world:latest Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: 1. The Docker client contacted the Docker daemon. 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. (arm32v7) 3. The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading. 4. The Docker daemon streamed that output to the Docker client, which sent it to your terminal. To try something more ambitious, you can run an Ubuntu container with: $ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/ For more examples and ideas, visit: https://docs.docker.com/get-started/ sudo docker info Client: Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.10.2 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.16.0 Path: /usr/libexec/docker/cli-plugins/docker-compose Server: Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 1 Server Version: 23.0.1 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 runc Default Runtime: runc Init Binary: docker-init containerd version: runc version: v1.1.4-0-g5fd4c4d init version: de40ad0 Security Options: seccomp Profile: builtin Kernel Version: 4.4.194 Operating System: Debian GNU/Linux 10 (buster) OSType: linux Architecture: armv7l CPUs: 4 Total Memory: 1.944GiB Name: linaro-alip ID: Docker Root Dir: /var/lib/docker Debug Mode: false Registry: https://index.docker.io/v1/ Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false ##if you're not able to execute sudo apt-get update afterwards, please do the following: sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock Share this post Link to post Share on other sites
Vincent123 0 Posted May 8, 2023 Hi, Is this "(updated/ easier way to install" applicable to Debian GNU/Linux 9.9 (stretch) for Tinkerboard? If yes, there is no 'iptable-legacy' in my tinkerboard. Quote $ ls /usr/sbin/iptables-legacy ls: cannot access '/usr/sbin/iptables-legacy': No such file or directory if no, is there new way of installation for Debian 9.9 (stretch)? Thanks! Share this post Link to post Share on other sites
tooz 52 Posted May 8, 2023 hello @Vincent123, i haven't tried installing docker on debian 9, which version of tinker os and what's the error you're seeing? Share this post Link to post Share on other sites
Vincent123 0 Posted May 10, 2023 hi @tooz, Thanks for your reply. Background: My targeted Tinkerboard software is supported by docker in TinkerOS Debian-Stretch-V1.0.4, but not sure is it supported in TinkerOS @Debian 10. Therefore I would like to install docker in Stretch. My board information: Tinkerboard edge R (R1.01) OS image: Tinker_Edge_R-Debian-Stretch-V1.0.4-20200615.zip I tried your "(updated/ easier way to install)", Errors and related commands are listed below: Quote #command: sudo curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh #errors: E: Unable to locate package docker-compose-plugin E: Unable to locate package docker-ce-rootless-extras E: Unable to locate package docker-buildx-plugin Detailed output at the end of this reply. No errors before that. I tried download docker from https://download.docker.com/linux/debian/dists/stretch/stable/binary-arm64/Packages then I try install using "apt install ./Packages" but not working. Would you please advise me on how to install docker for Debian stretch? BTW, in command below, I assume you mean "https" instead of htts. Quote (updated/ easier way to install) curl -fsSL htts://get.docker.com -o get-docker.sh && sh get-docker.sh Thank you very much @tooz! Quote #detailed command output linaro@linaro-alip:/N/tinkerboard-setup$ sudo curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh | tee get-docker.sh.log # Executing docker install script, commit: a8a6b338bdfedd7ddefb96fe3e7fe7d4036d945a DEPRECATION WARNING This Linux distribution (debian stretch) reached end-of-life and is no longer supported by this script. No updates or security fixes will be released for this distribution, and users are recommended to upgrade to a currently maintained version of debian. Press Ctrl+C now to abort this script, or wait for the installation to continue. + sudo -E sh -c apt-get update -qq >/dev/null W: Target Packages (stable/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 + sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null + sudo -E sh -c mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings + sudo -E sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg gpg: WARNING: unsafe ownership on homedir '/home/linaro/.gnupg' + sudo -E sh -c chmod a+r /etc/apt/keyrings/docker.gpg + sudo -E sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian stretch stable" > /etc/apt/sources.list.d/docker.list + sudo -E sh -c apt-get update -qq >/dev/null W: Target Packages (stable/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-arm64/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list.d/docker.list:1 + sudo -E sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null E: Unable to locate package docker-compose-plugin E: Unable to locate package docker-ce-rootless-extras E: Unable to locate package docker-buildx-plugin #Previous command output linaro@linaro-alip:/N/tinkerboard-setup$ sudo sudo apt-get install ca-certificates curl Reading package lists... Done Building dependency tree Reading state information... Done ca-certificates is already the newest version (20200601~deb9u2). curl is already the newest version (7.52.1-5+deb9u16). Share this post Link to post Share on other sites
Vincent123 0 Posted May 10, 2023 hi @tooz, I solved the docker installation error using installation script below. Thank you! Quote echo =====start original installation code========== echo =====start apt-get update 1========== sudo apt-get update echo echo =====start apt-get -y install 1========== sudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-common echo echo =====start curl========== curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - echo echo =====remark add-apt-repository========== # sudo add-apt-repository \ # "deb [arch=arm64] https://download.docker.com/linux/debian \ # $(lsb_release -cs) \ # stable" echo =====after apt-get update 2========== sudo apt-get update echo echo =====start install docker========== sudo apt-get -y install docker-ce docker-ce-cli containerd.io echo echo =====start usermod========== sudo usermod -aG docker $USER echo echo =====disable reboot for check result manually========== #sudo systemctl reboot echo =====if result is correct, reboot manually using 'sudo reboot'========== Share this post Link to post Share on other sites
tooz 52 Posted May 10, 2023 hello @Vincent123, good to hear that the installation error's been solved 17 minutes ago, Vincent123 said: BTW, in command below, I assume you mean "https" instead of htts. and thanks for letting me know Share this post Link to post Share on other sites