How to install Docker (and Portainer) on a RaspberryPi and run millions of apps on your RaspberryPi!

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • This Tutorial goes over how to install and setup docker and Portainer on a RaspberryPi. This allows you to easily run millions of docker containers on your RaspberryPi to do anything from host a Wordpress website to block ads with PiHole.
    #Docker #RaspberryPi #Tutorial
    Hire Me! www.spacerex.co/hire-me/
    Sponsor the Channel: / spacerexwill
    Steps / videos mentioned
    Setup SSH on RaspberryPi: • Introduction to Raspbe...
    Code to install docker: curl -sSL get.docker.com | sh
    code to install Portainer : sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:linux-arm
    Amazon Links:
    RaspberryPi 4: geni.us/PLknu
    Cooling Case for the Pi (Better performance): geni.us/o9I4lOK
    Micro SD Card: geni.us/UBuiCTR
    External Hard drive: geni.us/GoEPF
    Samsung SSD: geni.us/SAaNeIZ
    *These are Amazon affiliate links, which means that if you purchase a product through one of them, I will receive a small commission (at no additional cost to you). Thank you for supporting my channel!
  • НаукаНаука

Комментарии • 180

  • @Phrozends
    @Phrozends 2 года назад +35

    Great video! Thank! Just a note, the -v in the docker command is for volumes, it maps the first path (docker container) to the second path (after the colon), which is a folder on the host operating system. That is how docker containers can persist data if they are killed or restarted.

  • @Jeffrey_Mason
    @Jeffrey_Mason 9 месяцев назад +1

    Best video yet. I have redone my PI about 4 times following other videos. Worked the first time with yours.

  • @matthewreid9502
    @matthewreid9502 2 года назад +12

    Excellent, excellent video. Everything was so clearly explained and shown. Told me why I was doing things and what they were. Thanks so much!

  • @bassam.2023
    @bassam.2023 2 года назад +3

    Of course, my favourite Raspberry Pi channel pops up when I want to install docker on my RPI :)

  • @PortainerIO
    @PortainerIO 3 года назад +28

    Thanks for the great tutorial! I've added it to our RUclips playlist 'Videos from the Portainer Community'. :)

  • @Frank-do1bg
    @Frank-do1bg Год назад

    This is the cleanest tutorial. Love the way you explained everything!

  • @iPigee
    @iPigee 6 месяцев назад

    I find the best tutorials right here on your page. Thank you, and Happy New Year, brother.

  • @seniorchief6136
    @seniorchief6136 Год назад

    Thanks for the video. I will try this. I'm planning to build my own home lab and dive deeper into networking, virtualization, containers etc. But this seems like a nice way of trying it out before I go full into it, plus I already have a pi that's never been used.

  • @zsquresh
    @zsquresh 2 года назад +1

    Great! Quick and precise!

  • @tamasbarabas574
    @tamasbarabas574 Год назад

    Thank you very much!
    I'm pretty green to this things. This tutorial was easy to follow and I got some good results even on a very old RPI. 😎🙏

  • @techmattr8483
    @techmattr8483 3 года назад +7

    -v is volume not variable. The docker.sock is mapping the local docker volume so portainer can manage the local docker resources.

  • @johngoverts4166
    @johngoverts4166 3 года назад +4

    Great video, thanks! I had been planning to try this stuff, but since I am a relative newbie on Docker and Portainer I was somewhat apprehensive to go ahead and try. You managed to get me going within a quarter of an hour. Kudos!!

    • @SpaceRexWill
      @SpaceRexWill  3 года назад

      haha Im glad! Portainer really just makes everything so much easier

  • @chrisblumarten
    @chrisblumarten Год назад

    your videos are so incredibly helpful. thanks for making them.

  • @tizahex
    @tizahex 3 года назад

    Nice tutorial! I would like to see more content for raspberry pi and networks. Keep up the good work.

  • @WesselLemmer
    @WesselLemmer 2 года назад

    Really appreciate you explaining commands

  • @ralf2403
    @ralf2403 2 года назад +2

    Super! please make more Raspberry Docker videos because most of the tutorials on YT are useless.. Thanks to your videos I set up my Raspberry and VPN :)

  • @joelnork9363
    @joelnork9363 Год назад

    Thanks for the video, just an update to help others, docker will not pull portainer with the command give if you are running 64bit, however if you run sudo docker pull portainer/portainer-ce that should work. Happy learning.

  • @golvellius6855
    @golvellius6855 2 года назад +1

    dude great stuff thank you!

  • @SimonYTC
    @SimonYTC 2 года назад

    Great! Worked perfectly!

  • @stuu3270
    @stuu3270 6 месяцев назад

    A voice I could listen to all day! Good tutorial too!

  • @TheDro
    @TheDro Год назад

    thanks this helped!

  • @kolemieux
    @kolemieux Год назад

    Exceptional video and explanation - thanks for sharing!

  • @C3PO_
    @C3PO_ Год назад +2

    Thanks very much for your concise and very useful tutorial! As a newbie to Linux and Docker, may I ask whether I need to manually update the pulled Docker images from time to time? If yes, how? Do I need to stop the corresponding containers before updating? Many thanks in advance!🙏

  • @zaur66
    @zaur66 3 года назад +7

    -e is for : Set environment variables , -v is for setting up volumes, you are exposing local 'storage' so to say into the docker container.

  • @GilBlumberg
    @GilBlumberg 2 года назад

    Brilliant, thanks for sharing

  • @mickvanbreukelen7445
    @mickvanbreukelen7445 День назад

    Thanks for this!

  • @tommilton6024
    @tommilton6024 2 года назад +2

    Thanks for the video, did you do any follow ups? I'm interested in whether you could pop pihole, home assistant and things like that within this setup? Thanks 👍

  • @pwnograffik
    @pwnograffik 2 года назад

    thanks, great info!

  • @weekenddiyprojects5072
    @weekenddiyprojects5072 2 года назад

    Thanks for sharing !

  • @nepsky
    @nepsky 3 года назад

    Looking forward to seeing more similar contents in the futures. Thank you.
    Regards,
    Your old Subscriber.

  • @Ramserik
    @Ramserik 3 года назад

    Thank you. Great one.

  • @omarcruz6326
    @omarcruz6326 2 года назад

    Great Video, Sir.

  • @ismailelayachi9337
    @ismailelayachi9337 3 года назад

    thank you. very interesting.

  • @manuelprivado
    @manuelprivado 2 года назад

    Gracias por el video. Segui los pasos y me funciono! Raspberry Pi CM4 8Gb Lite

  • @pedr0_m198
    @pedr0_m198 Год назад

    worked, thanks

  • @kellynorton
    @kellynorton Год назад

    I'm going to go ahead and say that this video was very useful.

  • @joshuasimmons571
    @joshuasimmons571 2 года назад +2

    for anyone who gets the deamon error when trying to pull portainer just reboot your rpi4

    • @JD-sb7mq
      @JD-sb7mq 2 года назад

      Thanks for sharing! I’m getting this error after trying to install docker “E: Sub-process /usr/bin/dpkg returned an error code (1)” which led to the daemon error “is this daemon running?”

    • @hollowt3a199
      @hollowt3a199 Год назад

      What a lifesaver

  • @mikk0706
    @mikk0706 2 года назад +1

    Thank you so much.

  • @TheMegaLuigi11
    @TheMegaLuigi11 6 месяцев назад

    Thank for your video

  • @jmccamb
    @jmccamb 2 года назад

    Thank you for this. Do you know if a Pi 2 or 3b+ will be able to handle this?

  • @richiegandragon2591
    @richiegandragon2591 8 дней назад

    Nice video, I just used it to repurpose my Pi-3B. Next is Nextcloud so I can dump google. i too had to change the portainer-ce:linux arm to latest. but working now.

  • @wisunhi77
    @wisunhi77 3 года назад

    Great video.

  • @kevinhughes9801
    @kevinhughes9801 3 года назад

    Great vid thanks

  • @Joooooooooooosh
    @Joooooooooooosh 2 года назад +29

    -v does not stand for variable. It stands for volume.

    • @jackfisher9833
      @jackfisher9833 6 месяцев назад

      who cares, it could stand for vandalism and i could care less. Geek language makes no sense anyways, so variable or volume, same thing.

    • @Joooooooooooosh
      @Joooooooooooosh 6 месяцев назад

      @@jackfisher9833 then you may wanna choose another line of work I dunno what to tell you.

    • @jackfisher9833
      @jackfisher9833 6 месяцев назад

      @@Joooooooooooosh back in the days if you saw me on DOS your jab would drop, and you would be the one to choose another line of work. It dont matter if you know what it stand for as long you know how to use it. If I had to explain everyone what everything means when writing extremely complicated batch files nobody would remember anything. Trust me there was sick amount of programming involved in making batch files with menus, sub menus, and without flooding screen with crap you dont want to display. These days are over and I didnt have any reasons to use Linux before now because Linux sucked, and it still kinda does, but there are more uses for this in private homes today then lest say 10 years ago.

    • @Joooooooooooosh
      @Joooooooooooosh 6 месяцев назад

      @@jackfisher9833 variables and volumes are two distinctly different concepts in docker. They are not interchangeable.

  • @enderpearl5971
    @enderpearl5971 8 месяцев назад

    i've been seeking for remote workstation . thanks alot !

  • @vincentnestler1805
    @vincentnestler1805 5 месяцев назад

    Thanks!

  • @44santhoshkumar41
    @44santhoshkumar41 2 года назад

    thank you

  • @selvin9845
    @selvin9845 Год назад

    @SpaceRex thank you very much for creating this type of videos, very helpful. 😎👍 ((SUBSCRIBED))

  • @rodrigoultrazone
    @rodrigoultrazone 3 года назад

    good tutorial

  • @PilotOdyssey
    @PilotOdyssey 2 года назад

    Ok I have it running do you have a tutorial for finding, installing then running Containers in Portainer you kind of glossed over the details.
    Thanks

  • @vladi2993
    @vladi2993 2 месяца назад

    Thank you for this helpful video! How can I update Portainer?

  • @ronm6585
    @ronm6585 2 года назад

    Thanks.

  • @michelghantous9466
    @michelghantous9466 5 месяцев назад

    I am new raspberry pi user. with the new version of software it asked for user name. Once I added it I had a difficulties with the tutorial as it asked for pi user and not the one I had. Once I figured that out. It went well. Thanks

  • @msdosfx
    @msdosfx 3 года назад

    I have set up Wiregaurd VPN server from your guide and tried unsuccessfully to get nextcloud up and running. I would love to see a tutorial on using Portainer and Docker to set up Nextcloud on Apache or NginX working with Wiregaurd. Would also love to see a tutorial on using Portainer to set up Pleroma instance

  • @MdWahidurRahmanOvi
    @MdWahidurRahmanOvi Год назад +5

    sudo docker pull portainer/portainer-ce:linux-arm64 (for 64bit rasbian os Debian version: 11 bullseye)

    • @lohnstar5
      @lohnstar5 Год назад +1

      thank you, just what I was looking for

  • @clauswobbe1
    @clauswobbe1 3 месяца назад

    Hi - great video! I'm new to Docker and Raspberry Pi 5 and I would love to see a video on how to deploy DokuWiki on my Pi5 using Docker.

  • @MuhammadHussain-qs5gp
    @MuhammadHussain-qs5gp Год назад

    Great Video.
    Any video which can guide how to install rasbarryPi on Synology Docker Container ?

  • @magicmanchloe
    @magicmanchloe Год назад +2

    the portainer-ce:linux-arm returned an error no matching manifest. but i was able to get it working useing portainer-ce:latest you can just run that if anyone else has this issue.

  • @viperacr99
    @viperacr99 3 года назад +8

    A tutorial for how to upgrade (or downgrade) containers to newer versions while keeping the existing one available in case the new one doesn't work would be great! If you could do it via synology docker UI that would be cool too.

    • @SpaceRexWill
      @SpaceRexWill  3 года назад +1

      Thats a good idea! I need to look into that! I think it should be fairly trivial to clone containers

  • @zk_6312
    @zk_6312 Год назад

    Interesting video, I have never heard of portainer or even docker until recently. How does docker and portainer handle system commands that need the sudo command? For instance, I am running a 3D printer application called Octoprint, but it needs to use the system commands for shutting down, rebooting, and restarting the octoprint service. So far I have not figured out how to do this so the commands don't do anything. Looking at the docker logs it says docker does not recognize or can't find the sudo command.

  • @krstech1269
    @krstech1269 Год назад

    Thank you, good energy...
    How about a webserver: Apache Tomcat?

  • @kevinhsin630
    @kevinhsin630 Год назад

    I had troubles using the sudo docker r and sudo docker rm portainer command. I went about having to do docker stop portainer, then sudo docker rm portainer to remove the container.

  • @ArunKumar001
    @ArunKumar001 Год назад

    .sock is a linux socket file in which docker api is exposed. Since portainer requires access to docker you are volume mounting the sock file to the container. Thanks for the tutorial.

  • @philiptalbert458
    @philiptalbert458 2 года назад

    Would you consider a video on setting up unbound on a raspberry pi?

  • @chicoleno007
    @chicoleno007 Год назад

    Great video. New sub to the channel. How about on how to put mqtt and homebridge

  • @MrStefanokj
    @MrStefanokj 10 месяцев назад

    Is there an alternative to portainer for arm v6 processors? Because I have a rasberry pi zero w and portainer is not supported :(

  • @HoundDogRock
    @HoundDogRock 5 месяцев назад

    Can I use this tutorial for my raspberry pi 2 B v1.1 running dietpi?

  • @renobodyrenobody
    @renobodyrenobody 2 года назад

    Ha thanks for your video, gonna try with the Pi400. Just an idea: I cannot see (I am so ooold) anything on the portainer in web browser part, I suggest you zoom in a bit. Anyway, thanks again!

  • @BrianThomas
    @BrianThomas 2 года назад

    Great video. Question: How would this work if I have 8 Pi's in a cluster and I want to spin up applications in containers as needed? Will portioner support that?

    • @ArunKumar001
      @ArunKumar001 Год назад +1

      You should try docker swarm or kubernetes. Portainer is only a gui for docker and docker runs on one host only.

  • @riggsron
    @riggsron Год назад

    Thank you, thank you, thank you. Not only how but why Docker.

  • @izmarsel
    @izmarsel Год назад

    ¡Gracias!

  • @awardblvr
    @awardblvr 2 года назад

    Questions: 1. How do I make sure any container I deploy on Portainer/docker with web access is visible externally (Ie. on my home LAN only, of course, not port-forwarded outside .. just inside my LAN)
    2. How do I set permissions and ownership on various Portainer volumes/directories, etc to allow me to touch those folders from a general Ras Pi login?
    3. What is a "Bind" dir and what are the various modes of "connected networks"? Thanks!!!

  • @samone5618
    @samone5618 2 года назад

    I like the quick method on updating the Docker but I got this error at the end "Failure unable to initiate communications with endpoint" how to resolve this or else I have to delete the whole thing and search another set up. Thanks buddy

  • @joegpapst2129
    @joegpapst2129 11 месяцев назад

    this procedure works on Orange pi zero 2?

  • @knoopx
    @knoopx 2 года назад

    v is for volume not variable, docker.sock is passed to portainer so portainer can manage host's docker via unix sockets.

  • @fate2022
    @fate2022 2 года назад

    so how do you ad something like android using docker, or can you even do that?

  • @StellarDudes
    @StellarDudes 2 года назад

    hi there! kept getting " Error response from daemon: failed to create endpoint portainer on network bridge: failed to add the host (veth 0695a4) sandbox (veth 2cd0e4) pair interfaces: operation not supported." but many people said to reboot and good to go but that hasnt worked for me , any suggestions ?

  • @robertbeatty4542
    @robertbeatty4542 3 года назад

    Great video! Do you have any idea why I can't load portainer from another PC? I can only load it from the Pi

    • @SpaceRexWill
      @SpaceRexWill  3 года назад

      If I had to guess your portainer might be set to local host only

  • @mjeshurun
    @mjeshurun 2 года назад

    Thank you, SpaceRex , for a great tutorial.
    Can I use the curl command you included to install Docker on Raspberry Pi OS 64bit?
    or should I use a different curl command for the 64bit OS?

    • @sammyjenkin
      @sammyjenkin 2 года назад +10

      curl command will work for 64bit OS.. but you will need to change the image to docker pull portainer/portainer-ce:alpine

    • @TEKENGLOBAL
      @TEKENGLOBAL 2 года назад +3

      @@sammyjenkin I wanted to take a few moments to personally thank you for this key information. As how to get 64 bit Portainer installed on the latest 64 bit OS. I must have read and wasted two days just to find this valuable information!
      The fact the official websites don't offer this key information is a: FAIL!
      Thank You!

    • @sammyjenkin
      @sammyjenkin 2 года назад +2

      @@TEKENGLOBAL No problem, glad to have helped.

  • @pillowism
    @pillowism 3 года назад

    Would love a tutorial on port forwarding individual dockers so I can access apps online like say a RSS feed app such as freshRSS, i want to be able to access my news feed from across the globe. Thanks in advance and thank you for this tutorial!!

    • @SpaceRexWill
      @SpaceRexWill  3 года назад +2

      To do this all you really have to do is setup a DDNS server (have a tutorial on it). This will give you a hostname (read: www.google.com) that points to your homes IP address.
      From there you can just port forward from your router to the pi whatever ports are

  • @Yamheadyan
    @Yamheadyan 2 года назад +2

    You mentioned at around 2:50 to do a quick glance for any malicious code. Unfortunately as a newbie to coding, I do not know what to look for. Any pointers?

    • @barbyboi
      @barbyboi 2 года назад

      Generaly is to say, if a code is open source, a company doesnt have spyware in it. Otherwise, i think you just need to learn a bit of coding, or just look a bit of codd in the internet if it seems suspicious.

  • @user-tb5ss6gr2n
    @user-tb5ss6gr2n 3 месяца назад

    thinks you I love you

  • @JD-sb7mq
    @JD-sb7mq 2 года назад

    so im trying to pull the HOOBS image from dockerio and I keep getting a timeout error I don’t know how to fix. The first time I got this error when I was pulling the portainer image but rebooting my pi fixed it.
    Could someone explain what I need to do to fix that?

  • @theuptaker
    @theuptaker 2 года назад

    One more question. I’ve got this running on my RPI using your video so thank you. Now I’m wondering if these same scripts will work on my Mac using terminal? Want to run an AMD container and seeing that OS X is Linux it might work?

    • @SpaceRexWill
      @SpaceRexWill  2 года назад

      You should be able to get portioner on your Mac. It will need a different build of portioner but (not ARM)

  • @sbschuppel8552
    @sbschuppel8552 2 года назад

    Can you install Docker & Portainer on RAspberry pi ' Buster "lite"?

  • @igncodmyt6412
    @igncodmyt6412 Год назад

    Portainer timeout when I enter the ip address and port..

  • @helloukw
    @helloukw Год назад

    For error "docker: Error response from daemon: failed to create endpoint portainer on network bridge: failed to add the host" you just need to run command sudo reboot in order to reset your rPI. After that you can run sudo docker rm portainer and try again the portainer command.

  • @sbschuppel8552
    @sbschuppel8552 2 года назад

    Watching and looking at the script file. What is :AzureChinaCloud"?

  • @Farlot911
    @Farlot911 2 года назад +2

    Please add a annotation or something about having to reboot your Pi if you update/upgrade from the base image straight away, the install will fail without a reboot first :)

  • @TarakoBR
    @TarakoBR Год назад

    3:52 Now you just seat back and relax ... (Tense face)
    Just kidding, awesome content, buddy, I am benefiting of a lot :D

  • @sharonxhazan
    @sharonxhazan Год назад

    how do i install wordpress on it?

  • @fishtailfred8686
    @fishtailfred8686 2 года назад

    To install curl..
    sudo apt install curl

  • @matejsokolec2973
    @matejsokolec2973 2 года назад +1

    For you guys running 64 bit versions of raspbian the pull may fail.
    What will work is this: docker pull portainer/portainer-ce:linux-arm64

    • @KenPryor
      @KenPryor Год назад

      Thank you for this!

  • @danielnagy6809
    @danielnagy6809 2 года назад +1

    At 7:50 i get a message, “unable to find image portainer/portainer-ce:linux-arm locally.
    Any solution for this?

    • @SRCN999
      @SRCN999 2 года назад +2

      sudo docker pull portainer/portainer-ce:latest
      sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

  • @daves4026
    @daves4026 2 года назад

    More docker with mariadb lamp server. Also cctv home NVR with docker please

  • @gogorunrun
    @gogorunrun 2 года назад +1

    I’m a totally noob and I made it work. Cool video, thanks.
    Only thing was “linux-arm” did not work for me, so after a bit a searching I used “latest” instead

  • @tommytigerpants
    @tommytigerpants 2 года назад +1

    When running the 'sudo docker' command, it returns that 'no matching manifest for linux/arm64/v8 in the manifest list entries' - any advice on this please?

    • @plu2
      @plu2 2 года назад +1

      sudo docker pull portainer/portainer-ce:latest
      and remember to change it here as well:
      code to install Portainer : sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

  • @Ryan-ul8yf
    @Ryan-ul8yf 8 месяцев назад

    what is the command to remove the container? I made the same mistake you did in the video and now im stuck..

  • @toxicculture4682
    @toxicculture4682 4 месяца назад

    so…how do you remove the container you had us screw up on

  • @mahmoodbina2193
    @mahmoodbina2193 11 месяцев назад

    Alright !