Notifications
Clear all

Are there any Docker experts here?

27 Posts
4 Users
5 Likes
438 Views
frogandtoad
(@frogandtoad)
Noble Member
Joined: 4 years ago
Posts: 1506
 

@zander

Posted by: @zander

@yurkshirelad The idea of downloading a container is not appealing to me for a few reasons. Using Strawberry Pi OS and doing an "apt install" gets me the widget. I am not experimenting with different flavours or versions of a web server, it's a tool I need and want it to just run in the background and do what it does.

Hi Ron, I think @yurkshirelad has provided a pretty good explanation of Docker and how it works... As I'm not an expert either, I'm not sure I can offer anything that super exceeds what has been already provided, at least not in the basic sense of the issue.

What specifically do you want to test under docker?
What app do you want to run and test?  Webserver (apache, nginx)?, WordPress?, Home-Assistant, Node-Red, etc... all of these and more is possible.

However, you really need to be SPECIFIC, because so much is possible!

Cheers


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3915
Topic starter  

@frogandtoad I thought I was specific. I want to know why I should consider docker and where to get simple instructions. From what I have learned so far it sounds like I can run any collection of apps I want without docker. Late last night I caught a video saying that he downloaded a container. I don't want that concept. I simply want to do a normal 'apt install xyz' then 'wrap' it in a container? but it sounds like that isn't how it works.

It sounds to me like docker is for organizations to use as deployment tools, I simply want to set up a Pi to run all the apps a normal home server would like a web server, mail, PiHole, Bill's air quality server, weather server, possibly a garden monitor server (my wife has a dedicated purchased garden that produces useless plants) NAS, back up, PLEX etc.

I am totally comfortable building/configuring/operating all of those, I just thought that maybe docker was a better way to run them but it sounds like that is not it's primary purpose. 

Unless someone can tell me I am waaaaay off base, I think I will just set up each application the way it was meant to be and not bother with adding more complexity by installing docker. Thanks for your input.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
DaveE
(@davee)
Prominent Member
Joined: 2 years ago
Posts: 788
 

Hi @yurkshirelad,

   Thanks for your MySQL example above .. I haven't tried doing  it, as I am doing completely different stuff at the moment and have enough difficulty concentrating on one thing at a time, but a superficial read made it look much easier than the 'getting started' explanation I tried some time ago. I may revisit your post sometime in the future.

Best wishes, Dave


   
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 4 years ago
Posts: 1506
 

@zander

Posted by: @zander

@frogandtoad I thought I was specific. I want to know why I should consider docker and where to get simple instructions. From what I have learned so far it sounds like I can run any collection of apps I want without docker. Late last night I caught a video saying that he downloaded a container. I don't want that concept. I simply want to do a normal 'apt install xyz' then 'wrap' it in a container? but it sounds like that isn't how it works.

It sounds to me like docker is for organizations to use as deployment tools, I simply want to set up a Pi to run all the apps a normal home server would like a web server, mail, PiHole, Bill's air quality server, weather server, possibly a garden monitor server (my wife has a dedicated purchased garden that produces useless plants) NAS, back up, PLEX etc.

I am totally comfortable building/configuring/operating all of those, I just thought that maybe docker was a better way to run them but it sounds like that is not it's primary purpose. 

Unless someone can tell me I am waaaaay off base, I think I will just set up each application the way it was meant to be and not bother with adding more complexity by installing docker. Thanks for your input.

Ok, I'll kind of work backwards from your comments and try to clear a few things up for you as best I can.

1) Docker does add some complexity, but that's not a negative, because just like learning anything else, there is some learning curve involved.  Now, that curve can get very complex at the deep end, but for many use cases you will never need to delve there - That is for the real enterprise level experts who delve in the deep all day long and have no life 😉

2) Indeed, Docker is used a lot in the enterprise DevOps space to deploy docker containers, which are applications.  Using Docker, you can deploy an application super duper fast, and because they are very lightweight containers, they also run super duper fast.

3) Given that you're totally comfortable building/configuring/operating all of the applications you mentioned, then you should be able to breeze through the container configuration(s).

4) Yes, you can run a collection of many different containers, and they can all access each other in your network, and there are many advanced features of networking them too, but not required for the basic tinkering person for their home network.

5) There are a few basic concepts that you need to understand.
    a) You do not download "containers", you download "images" (AKA Blueprints)
    b) You create a container locally based on the downloaded image, and run it, but it's not the best way to do it
    c) It's better to create a "Dockerfile" (YAML Format), and then use that to build the image just how you want
        ... think of the "Dockerfile" as a batch/make file used to customise your image (this is not very difficult at
        ... all), before you actually create your container from it

Now to answer your first question, as to why should you consider it, here's an example to ponder on:

With Docker installed, simply run the following command:

    YourPrompt$ docker run --name=rons-web-server -p 80:80 -d nginx

... it only takes ~15 seconds to download the image and automatically execute it.

navigate to //localhost, and there is the default nginx landing page:

image

You can run "docker ps -a" at your prompt to see it running, and run "docker start/stop rons-web-server" to start/stop it.

Now, like you say... you can download nginx without docker, but the file will be larger, take longer to actually install it, and might even require further config before starting it up and hitting the URL... likewise, you've polluted your operating system with files that you may not be able to easily uninstall, etc...

You can simply remove the Docker container you created with "docker rm container_id", and your operating system will not have been harmed or polluted at all.

Again, this is the very basics of Docker - To really make use of this, you'll need to use a Dockerfile to set it up internally, and create persistent storage, etc...

The more you learn about containers, the more you'll appreciate what they can do, and you might even enjoy it 😉

Cheers 


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3915
Topic starter  

@frogandtoad Sounds interesting but when I tried it before I remember there being a bunch mnore steps and more docker things. At first it went well but eventually it broke and I had no idea how to fix it.

My question is where can I learn how to setup a naked Pi4b-4GB with a handful of containers. I do NOT want to see

docker run --name=rons-web-server -p 80:80 -d nginx

what I want is to learn how to setup docker. I do recall there were a handful of supporting apps to install around docker before installing the first container. 

Docker for dummies is one of the books I would have bought back in the day, and if it was *nix based then an O'Reilly book or two plus maybe one other.

 

 

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3915
Topic starter  

@frogandtoad You have convinced me, I am going to give it a try after I make a list of what to run on the 'home server' Getting PLEX on will be the challenge, I had it so messed up it was useless then one of the top Plex support guys walked me through and we found where the one word that led me astray was and made adjustments. Unfortunately that was maybe 2 years ago and I have forgotten everything about it so will be starting over.

One question I have immediately. There is some configuration to do in PLEX. If I install a PLEX container and later decide to wipe the Pi and start over is it possible to save a modified PLEX container so that a re-install both looks exactly like the first but contains the PLEX config data.

If I may, I am thinking from what you and others have said that I can simply copy the container to say a thumb drive, rebuild my Pi then simply copy the modified PLEX container back to the new Pi. Is it that easy?  

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 4 years ago
Posts: 1506
 

@zander

Posted by: @zander

@frogandtoad Sounds interesting but when I tried it before I remember there being a bunch mnore steps and more docker things. At first it went well but eventually it broke and I had no idea how to fix it.

Hard to say, as I have no real idea what you did back then 🙂

My question is where can I learn how to setup a naked Pi4b-4GB with a handful of containers. I do NOT want to see

docker run --name=rons-web-server -p 80:80 -d nginx

...OK, but!

At some point in time, you will need the command line, and I actually recommend learning it first before moving to GUI.  Having said that, there are GUI options available to you, to manage Docker containers, such as the following:

"Portainer" and "Rancher"

... which are probably the most popular of the pack.

what I want is to learn how to setup docker.

That is the easy part, just a one line command on the PI using curl... a quick google search will find it so easy.

Here is a link how to install Docker on Pi4

Install Docker on Pi4

I do recall there were a handful of supporting apps to install around docker before installing the first container. 

Not that I am aware of?

Docker for dummies is one of the books I would have bought back in the day, and if it was *nix based then an O'Reilly book or two plus maybe one other.

Those Dummies books are "just" OK IMO, and there are far better books available, if you're willing to pay for them.

Hi Ron, comments in-line.

Cheers

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 4 years ago
Posts: 1506
 

@zander

Posted by: @zander

@frogandtoad You have convinced me, I am going to give it a try after I make a list of what to run on the 'home server' Getting PLEX on will be the challenge, I had it so messed up it was useless then one of the top Plex support guys walked me through and we found where the one word that led me astray was and made adjustments. Unfortunately that was maybe 2 years ago and I have forgotten everything about it so will be starting over.

Although I love music and video, I don't really run or have any interest in media streaming, virtually or otherwise, but I am happy to help you set it up if you need any help.

One question I have immediately. There is some configuration to do in PLEX. If I install a PLEX container and later decide to wipe the Pi and start over is it possible to save a modified PLEX container so that a re-install both looks exactly like the first but contains the PLEX config data.

Yes, 100%, and across different operating system environments - This is one of the benefits of using Docker!

If I may, I am thinking from what you and others have said that I can simply copy the container to say a thumb drive, rebuild my Pi then simply copy the modified PLEX container back to the new Pi. Is it that easy? 

Although you can copy or export containers, from what I've read it is easier (and preferable) to save your actual image, copy it over and launch that in any Docker supported environment - In essence, yes... you can backup images and containers to re-deploy them, just as they previously were.

I suggest you start small though

Cheers

Hi Ron, comments in-line.

Cheers


   
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3915
Topic starter  

@frogandtoad I mis-spoke, I will not be installing Plex, I don't really need it anymore and had big problems with it. I will start small and just connect my twin 8TB media drives to the Pi and see what Docker has in the way of a NAS. That may not happen anytime soon though, just don't have space at the moment although I could do a temporary connection to try it out. Just to be sure, all I need is the ability to access the drives from my Mac using the Gigabit WiFi connection from my Mac to the router then by ethernet cable to the Pi. I will also want to add PiHole and some of Bill's projects like Air Quality and Weather station. I am sure I will have more questions later.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
frogandtoad reacted
ReplyQuote
Ron
 Ron
(@zander)
Famed Member
Joined: 2 years ago
Posts: 3915
Topic starter  

Posted by: @frogandtoad

@zander

Posted by: @zander

@frogandtoad Sounds interesting but when I tried it before I remember there being a bunch mnore steps and more docker things. At first it went well but eventually it broke and I had no idea how to fix it.

Hard to say, as I have no real idea what you did back then 🙂

My question is where can I learn how to setup a naked Pi4b-4GB with a handful of containers. I do NOT want to see

docker run --name=rons-web-server -p 80:80 -d nginx

...OK, but!

At some point in time, you will need the command line, and I actually recommend learning it first before moving to GUI.  Having said that, there are GUI options available to you, to manage Docker containers, such as the following:

"Portainer" and "Rancher"

... which are probably the most popular of the pack.

what I want is to learn how to setup docker.

That is the easy part, just a one line command on the PI using curl... a quick google search will find it so easy.

Here is a link how to install Docker on Pi4

Install Docker on Pi4

I do recall there were a handful of supporting apps to install around docker before installing the first container. 

Not that I am aware of?

Docker for dummies is one of the books I would have bought back in the day, and if it was *nix based then an O'Reilly book or two plus maybe one other.

Those Dummies books are "just" OK IMO, and there are far better books available, if you're willing to pay for them.

Hi Ron, comments in-line.

Cheers

 

I was using portainer and a few other docker 'things', sorry for the poor memory. When I say 'setup docker' I don't mean install, I know how to do that. My memory is there were settings and processes that were probably not really needed but did some 'cool' stuff. Maybe a dashboard, some sort of monitoring, again, sorry my memory is bad and it was a while ago.

Do you run a Pi with docker on it? Or docker on some other platform?

 

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 4 years ago
Posts: 1506
 

@zander

Posted by: @zander

@frogandtoad I mis-spoke, I will not be installing Plex, I don't really need it anymore and had big problems with it. I will start small and just connect my twin 8TB media drives to the Pi and see what Docker has in the way of a NAS. That may not happen anytime soon though, just don't have space at the moment although I could do a temporary connection to try it out. Just to be sure, all I need is the ability to access the drives from my Mac using the Gigabit WiFi connection from my Mac to the router then by ethernet cable to the Pi. I will also want to add PiHole and some of Bill's projects like Air Quality and Weather station. I am sure I will have more questions later.

Cool, no problem... let us know when ready...

 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Noble Member
Joined: 4 years ago
Posts: 1506
 

@zander

Posted by: @zander

Posted by: @frogandtoad

@zander

Posted by: @zander

@frogandtoad Sounds interesting but when I tried it before I remember there being a bunch mnore steps and more docker things. At first it went well but eventually it broke and I had no idea how to fix it.

Hard to say, as I have no real idea what you did back then 🙂

My question is where can I learn how to setup a naked Pi4b-4GB with a handful of containers. I do NOT want to see

docker run --name=rons-web-server -p 80:80 -d nginx

...OK, but!

At some point in time, you will need the command line, and I actually recommend learning it first before moving to GUI.  Having said that, there are GUI options available to you, to manage Docker containers, such as the following:

"Portainer" and "Rancher"

... which are probably the most popular of the pack.

what I want is to learn how to setup docker.

That is the easy part, just a one line command on the PI using curl... a quick google search will find it so easy.

Here is a link how to install Docker on Pi4

Install Docker on Pi4

I do recall there were a handful of supporting apps to install around docker before installing the first container. 

Not that I am aware of?

Docker for dummies is one of the books I would have bought back in the day, and if it was *nix based then an O'Reilly book or two plus maybe one other.

Those Dummies books are "just" OK IMO, and there are far better books available, if you're willing to pay for them.

Hi Ron, comments in-line.

Cheers

I was using portainer and a few other docker 'things', sorry for the poor memory. When I say 'setup docker' I don't mean install, I know how to do that. My memory is there were settings and processes that were probably not really needed but did some 'cool' stuff. Maybe a dashboard, some sort of monitoring, again, sorry my memory is bad and it was a while ago.

Do you run a Pi with docker on it? Or docker on some other platform?

Not at the moment, but I did learn all about docker on a rpi2 with only 1GB? ram, and it ran just fine.

Cheers

 


   
ReplyQuote
Page 2 / 2