Because the Raspberry Pi is based on ARM architecture, the installation and use of Docker are also different. There is a lot of content that needs to be discussed, so I will just pick it out here. Raspberry Pi is based on ARM architecture, which is different from PC. So even if you can make some docker images on the Raspberry Pi, you can't run them on other PCs. Conversely, Docker images on other PCs cannot run on the Raspberry Pi. If you need to find a Raspberry Pi-specific image, just search for There is a warehouse called Raspberry Pi reference: Get Docker CE for Debian Reference: My home server powered by Pi and Docker The most difficult part of installing Docker on Raspberry Pi is to correctly select the source and add the GPG-key, so that you can find and download the appropriate version of Docker. This process is very cumbersome and it is difficult to have a unified solution. Official version one-click installation script Note: Many people say that the official one-click installation script is no longer supported. But the current position is actually still supportable. Reference: The easy way to set up Docker on a Raspberry Pi Before I start, let me explain: I have failed many times before and have found many related solutions but none of them worked. until. . . It didn't work until I In fact, you can see during the upgrade that many system dependency packages have been updated, which solves all the problems that caused the previous unsuccessful Docker installation. After the upgrade is completed, the formal installation begins: You need to use a shell script, $ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh When completed, it will display: Then run hello world and try it out: $ sudo docker run hello-world Then it displays: Manual Installation Preparation: #Install SSL related, let apt download via HTTPS: sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common # Add docker's GPG key curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - # Check if the key matches (9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88) sudo apt-key fingerprint 0EBFCD88 #Add apt download source for docker sudo echo "\ndeb-src [arch=amd64] https://download.docker.com/linux/debian wheezy stable\n" >> /etc/apt/sources.list #Update source sudo apt-get update Install docker: $ sudo apt-get install docker-ce Execute docker without sudo In order to avoid having to type # Create the docker user group sudo groupadd docker # Add the current user to the docker user group sudo gpasswd -a $USER docker # Update the current user group changes (no need to log out and log in again) newgrp docker Install docker-compose You can download and run docker run \ -v /var/run/docker.sock:/var/run/docker.sock \ -v "$PWD:/rootfs/$PWD" \ -w="/rootfs/$PWD" \ docker/compose:1.13.0 up # Set alias shortcuts (`~/.zshrc` or `~/.bash_profile`) alias docker-compose="'"'docker run \ -v /var/run/docker.sock:/var/run/docker.sock \ -v "$PWD:/rootfs/$PWD" \ -w="/rootfs/$PWD" \ docker/compose:1.13.0'"'" Common Errors First check whether $ sudo apt-get install lsb-release If you still have this problem, check your Python version. If it is python3, then it is likely that the version is insufficient, because lsb_release requires at least python3.5. # Backup (the specific location of Python depends on your own situation) $ sudo mv /usr/bin/python /usr/bin/python_bak # Replace $ sudo ln -s /usr/bin/python2.7 /usr/bin/python Then try
The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
>>: MySQL 4G memory server configuration optimization
JavaScript - Principles Series In daily developme...
How to solve the problem of 1045 when the local d...
In daily work, we may encounter a layout like thi...
Yesterday, I wrote a blog about the circular prog...
js date time format Convert the date and time to ...
Solution to 1449 and 1045 exceptions when connect...
Original article, please indicate the author and ...
background As we all know, after we develop a Jav...
Table of contents 1. Introduction: 2. Docker: 1 C...
Often when building a SPA, you will need to prote...
<br />In one year of blogging, I have person...
Table of contents Overview 1. Acquisition and pro...
3. MySQL Data Management The first method: not re...
Overview Let's summarize some SQL statements ...
A jQuery plugin every day - to make search histor...