raspi 8GB ã§docker ãå ¥ãã¦éã¶
raspi 8GB ãæå ã«ããã®ã§ãdocker ã¨ã snap ã¨ã lxc ã¨ãåããã¦éã¶ã
raspbian ã§åããã¨ã¬ãã¸ããªã§æãããã®ã§ãæåãã aarch64 ç¨ã«ã³ã³ãã¤ã«ããã ubuntu ãã¤ã³ã¹ãã¼ã«ãã.
ã¤ã³ã¹ãã¼ã«å¾ã®raspberry pi ubuntu ã®ç¶æ ã¯ãããªæãã ã£ãã
ubuntu ã®ãã¼ã¸ã§ã³ãè¦ã¦ã¿ãã aarch64 ã§64bitçã ã¨ãããã
# cat /etc/os-release && uname -a NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal Linux ubuntu 5.4.0-1035-raspi #38-Ubuntu SMP PREEMPT Tue Apr 20 21:37:03 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
raspi ubuntu ã« docker ãã¤ã³ã¹ãã¼ã«
é常㮠ubuntu ã¨åããdocker ã®ã¤ã³ã¹ãã¼ã«ã«ç¹ã«æé ã¯ãªãé常ã®ubuntuã§ããã
sudo snap install docker sudo groupadd docker sudo usermod -aG docker $USER sudo chown root:docker /var/run/docker.sock sudo chown "$USER":"$USER" /home/"$USER"/.docker -R sudo chmod g+rwx "$HOME/.docker" -R # sudo reboot systemctl restart docker.service
åä½ãã§ãã¯
docker run 㧠hello-world ãåããã¦ã¿ãã
takuya@raspi-ubuntu:~$ docker run --rm hello-world Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world 256ab8fe8778: Pull complete Digest: sha256:5122f6204b6a3596e048758cabba3c46b1c937a46b5be6225b835d091b90e46c 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. (arm64v8) 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/
åãã¾ããã
ubuntu on docker raspi
raspi4 ä¸ã® ubuntu 㧠docker ubuntu ãåããã¦ãã
takuya@raspi-ubuntu:~$ docker run --rm ubuntu cat /etc/os-release Unable to find image 'ubuntu:latest' locally latest: Pulling from library/ubuntu 80bc30679ac1: Pull complete c937c19c2d76: Pull complete ba4ad2754376: Pull complete Digest: sha256:adf73ca014822ad8237623d388cedf4d5346aa72c270c5acc01431cc93e18e2d Status: Downloaded newer image for ubuntu:latest NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
å¿«é©ã ã£ã
ãã¸å¿«é©ã«ããµã¯ãã¨ã¤ã³ã¹ãã¼ã«çµããã¾ããã
raspi4 8GB + ubuntu ã¯ãã¡ã¢ãªãå¤ãã®ã§ãããããã«ãã£ã¡ã使ããããã
aarch64 ã® docker ubuntu éããããã¯ã©ã¹ã¿ãªã³ã°ããããªãã