Ungayifaka kanjani i-Docker ku-Raspberry pi ngeRaspbian?

I-Docker uhlelo lwesitsha ukuthi awudingi izinsizakusebenza eziningi ukusebenzisa iziqukathi, ngakho-ke Kukhanya kakhulu futhi ngenxa yalokho uDocker angaba ngumqokelwa ophelele wokuthuthukiswa kohlelo lokusebenza lwewebhu nokuhlolwa kuRaspberry Pi.

Kunjalo, ingenza ezinye izinto njengokusebenzisa iseva yewebhu, iseva elibambayo noma isiphakeli semininingwane nokuningi ku-Docker ku-Raspberry Pi.

Uma ungazi nge-Docker, kufanele wazi ukuthi le iphrojekthi yomthombo ovulekile leyo shintsha ukuthunyelwa kwesicelo ngaphakathi kweziqukathi zesoftware, ukuhlinzeka ngesendlalelo esingeziwe sokukhishwa kokusebenza kokuzenzakalela nokuzenzakalelayo kuzinhlelo eziningi zokusebenza.

Docker isebenzisa izici zokuhlukaniswa kwemithombo ye-Linux kernel, njengamaqoqo kanye nezikhala zamagama (izikhala zamagama) ukuvumela "iziqukathi" ezihlukile ukuthi zisebenze ngaphakathi kwesimo esisodwa se-Linux, ukugwema isisekelo sokuqala nokugcina imishini ebonakalayo.

Ukulungiselela i-Raspberry Pi

Ukufaka i-Docker ku-Raspberry Pi yethu akuyona into yokubhala ekhaya ngayo futhi ukufakwa kwayo kulula. Kulesi sifundo Sizothatha njengesisekelo uhlelo olusemthethweni lwe-Raspberry yethu okuyiRaspbian.

Uma namanje ungenalo lolu hlelo olufakwe kwi-Raspberry yakho, ungahlola i-athikili elandelayo lapho sichaza ukuthi ungayenza kanjani ngendlela elula. Isixhumanisi yilokhu. 

Kakade i-Raspbian ifakiwe ku-Raspberry pi yethu, sizobuyekeza amaphakheji kanye ne-Raspbian APT yokugcina inqolobane ngomyalo olandelayo:

sudo apt update

Manje, kufanele ubuyekeze wonke amaphakheji wesoftware amasha atholakele evela eRaspbian. Ngalokhu kufanele senze umyalo olandelayo:

sudo apt upgrade

Okwamanje, amaphakheji wesoftware adinga ukuvuselelwa.

Manje, kufanele ufake ama-kernel-headers wohlelo lokusebenza. Lokhu kubalulekile, ngoba uma ungafaki izihloko ze-kernel, iDocker ngeke isebenze.

Ukufaka izihloko ze-kernel, konke okumele ukwenze ukusebenzisa umyalo olandelayo ku-terminal:

sudo apt install raspberrypi-kernel raspberrypi-kernel-headers

Ngakho konke okungenhla sekulungile, manje singaqhubeka nokufakwa kwe-Docker ku-Raspberry Pi yethu ethandekayo, ngoba siqiniseke ngokuphelele ukuthi sinawo wonke amaphakheji abuyekeziwe ohlelo.

Faka iDocker ku-Raspberry Pi

Ukufakwa kwe-Docker Sikwenza ngokusebenzisa umyalo olandelayo ku-terminal:

curl -sSL https://get.docker.com | sh

Le nqubo yokulanda nokufaka ingathatha isikhashana, ngakho-ke ngiphakamisa ukuthi uthathe isikhathi sakho.

Docker

Ngokufakwa kwe-Docker ohlelweni lwe-Raspberry Pi yethu, manje siqala ngomsebenzi wokuqalisa I-Docker ukuze ukwazi ukuyisebenzisa.

Kulokhu isinyathelo sokuqala ngukuthi engeza umsebenzisi wethu "pi" (Okuzenzakalelayo kweRaspbian) eqenjini ledokodo. Ngakho-ke, uzokwazi ukudala nokuphatha iziqukathi, izithombe, amavolumu, njll. docker ngaphandle kwamalungelo weSudo noma we-superuser.

Uma badala umsebenzisi ohlukile, kufanele bashintshe u- "pi" baye egameni labo lomyalo kumyalo. Ukufaka umsebenzisi we-pi eqenjini le-Docker kufanele nje basebenzise umyalo olandelayo:

sudo usermod -aG docker pi

Wenze lolu shintsho manje, kuzodingeka ukwenza ukuqala kabusha kohlelo lwethu, ukuze ushintsho olwenziwe lulayishwe ekuqaleni kohlelo futhi kufakwe iqembu lomsebenzisi wethu le-Docker.

Bangakwazi ukuqala kabusha uhlelo lwabo ngokusebenzisa umyalo olandelayo ku-terminal:

sudo reboot

Lapho uhlelo seluqale phansi, sibuyela kulo futhi sizovula ukuphela. Kuyo sizokwenza umyalo olandelayo ku qinisekisa ukufakwa kwe-Docker nokuthi isivele isebenza ohlelweni:

docker version

Njengoba ukwazi ukubona, iDocker isebenza ngokuphelele ku-Raspberry Pi yakho.

Manje kufanele usebenzise isitsha sakho sokuqala. Ukuze wenze lokhu, ungasesha eyodwa ekhasini le-Docker, elifaka izinhlelo eziningi. Isixhumanisi yilokhu.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Yiba ngowokuqala ukuphawula

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe.

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

i-bool(iqiniso)