linaro@linaro-alip:~$ sudo apt-getupdate linaro@linaro-alip:~$ curl -sSL https://get.docker.com/ | sudo sh
安装过程需要花费大约10分钟
安装完成后查看Docker版本:
linaro@linaro-alip:~$ docker -v Docker version 24.0.2, build cb74dfc linaro@linaro-alip:~$
验证
linaro@linaro-alip:~$ sudo docker run hello-world Unable tofindimage 'hello-world:latest'locally latest:Pulling from library/hello-world 70f5ac315c5a:Pull complete Digest:sha256:a13ec89cdf897b3e551bd9f89d499db6ff3a7f44c5b9eb8bca40da20eb4ea1fa Status:Downloaded newer image forhello-world:latest [ 1228.015617] docker0: port 1(veth9b45dd3) entered blocking state [ 1228.015735] docker0: port 1(veth9b45dd3) entered disabled state [ 1228.017169] device veth9b45dd3 entered promiscuous mode [ 1228.027619] IPv6: ADDRCONF(NETDEV_UP): veth9b45dd3: link isnot ready [ 1228.343879] cgroup: cgroup: disabling cgroup2 socket matching due tonet_prio ornet_cls activation [ 1228.596774] eth0: renamed from vethc46e61e [ 1228.611961] IPv6: ADDRCONF(NETDEV_CHANGE): veth9b45dd3: link becomes ready [ 1228.612131] docker0: port 1(veth9b45dd3) entered blocking state [ 1228.612147] docker0: port 1(veth9b45dd3) entered forwarding state [ 1228.612346] IPv6: ADDRCONF(NETDEV_CHANGE): docker0: link becomes ready
Hello from Docker! This message shows that your installation appears tobeworking 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. (arm64v8) 3. The Docker daemon created anewcontainer from that image which runs the executablethat produces the output you are currently reading. 4. The Docker daemon streamed that output tothe Docker client, which sent it toyour terminal.
To trysomething more ambitious, you can run anUbuntu container with: $ docker run -it ubuntu bash
Share images, automate workflows, andmore with afree Docker ID: https://hub.docker.com/
For more examples andideas, visit: https://docs.docker.com/get-starte