Easy docker for someone who "doesn't do docker" reddit / selfhosted ---------------------------------------------------------------------- tech2but1 · 2023-10-29 18:52 There are a few things I want to host that are very firmly "docker only" images. I get docker, I understand why it exists but I can't get into it. I have had docker and portainer running in the past but found it cumbersome (portainer updates were a minor annoyance, and updating docker images seemed "wrong") but I can't get away from it. I happened across CasaOS earlier which sort of looked like something that would help, then looked at alternatives to this and saw someone suggest Cosmo which says it needs installing on docker so I got confused again! Is there anything that's truly worth using to make installing/managing/updating docker images simple or is it just more complicated in the long run? For the record I do have ESXi and countless VMs, I find spinning up a VM simple and it suffices for all my needs apart from a couple of specific things (like a Google Photos replacement). I don't really want to learn docker just to use Immich! ---------------------------------------------------------------------- ElevenNotes · 2023-10-29 18:55 and you don't have to. Install docker in a VM, create a simple compose or shell script and be done. If you're fine with using the latest tag a simple cron that restarts and repulls your container every night at 03:00 and you are set. No manual intervention needed. ---------------------------------------------------------------------- thekrautboy · 2023-10-29 18:58 > I don't really want to learn docker Then how do you expect to use it? You need to learn things in order to use them. Sure you dont need to become a Docker expert, but you need to learn and understand the very basics of it. If youre unwilling to do that at all, then there is simply no way. /r/CosmosServer or CasaOS can maybe make things easier for you to understand. But if you have already tried Portainer and "it felt wrong" somehow, then i dont know. > so I got confused again! Sure helps a lot when you dont explain what exactly confused you and how. Im not really sure what kind of answers you expect here. Btw /r/Docker exists for *drumroll*... Docker questions. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 19:03 > If youre unwilling to do that at all, then there is simply no way. That's not quite what I meant. I meant more like the need to use it hasn't outweighed the effort required to "learn docker" yet. I didn't mean I refused to learn docker though. > Sure helps a lot when you dont explain what exactly confused you and how. I don't understand YAML I guess is the main thing. Like for instance an install script presented as a bash file I can work through and understand how it all works and what it does. With docker I get a YAML file and it's a new language. Like I said, it's not that I'm saying I can't learn another language, I just haven't yet. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 19:05 I was wondering about going that route. I installed portainer last time to make it easier but I'm not sure it did really. I did feel portainer would have made more sense if I had multiple docker engines thiough. ---------------------------------------------------------------------- ElevenNotes · 2023-10-29 19:07 Portainer is not needed. ---------------------------------------------------------------------- SagaciousZed · 2023-10-29 19:11 >I don't understand YAML I guess is the main thing. Like for instance an install script presented as a bash file I can work through and understand how it all works and what it does. With docker I get a YAML file and it's a new language. Like I said, it's not that I'm saying I can't learn another language, I just haven't yet. Do you understand JSON? While YAML isn't just JSON with a different syntax, most of the concepts are similar to the point that most JSON files are valid YAML. To that end, you can write a docker-compose file in JSON if you wanted https://dockerlabs.collabnix.com/intermediate/workshop/DockerCompose/L ab\_%2324\_Use\_JSON\_instead\_of\_YAML\_compose\_file\_in\_Docker.htm l ---------------------------------------------------------------------- thekrautboy · 2023-10-29 19:13 Cosmos/Casa have a form of "appstore" builtin, which uses underneath Docker. You simply click on "immich" and it downloads and "installs" immich for you, done. The only thing you need to do is install Docker itself once. You dont need to touch any YAML after that if you run things from their appstore. ---------------------------------------------------------------------- CrestedCracker · 2023-10-29 19:14 Learn enough to deploy Portainer and then that will help guide you into the world of Docker via a GUI ---------------------------------------------------------------------- tech2but1 · 2023-10-29 19:19 I did that once but still ended up having to manually write the configs when bringing an image up in portainer. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 19:22 I might as well commit to just learning docker/yaml then if I still have to maintain a docker installation to run those on. CasaOS is a bit misleading by not being an OS, I think I have been slightly misled on the requirements/simpleness of its use. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 19:25 Yeah I think I totally misunderstood what CasaOS/Cosmos etc were and how they worked. Seems like I'd be better off just committing to learning docker! ---------------------------------------------------------------------- TheCudder · 2023-10-29 19:29 I run Docker Desktop on a Windows 10 VM. A year and a half in with zero issues, even though most will say "Nooo, don't do that! (I *do* have a couple of Rocky Linux docker containers going as well). For me, running it on W10 really helped to visualize the concept and understand what's doing what in a Docker environment --- because OP I felt like you initially. That aside, Always build out your docker containers in compose yaml files. It makes everything else a breeze going forward. docker down docker pull docker up Those 3 commands literally become your image update process. ---------------------------------------------------------------------- Accomplished-Lack721 · 2023-10-29 20:08 Sorry, but this sounds a bit: "I'd like to eat this piece of cake, but also still have it available to me when I'm done." There are front-ends that can make docker apps easier to manage, like CasaOS. The tradeoff for ease of use is flexibility compared to something like Portainer or the CLI. CasaOS's app library (for instance) frequently has out-of-date versions of apps, and if their default configuration doesn't make sense for your purposes, you're still going to have it delve deeper (whether in the CasaOS UI or another tool) to customize things to your needs. That's pretty much a given with any tool - if you don't want to deal with how it works, then you need to accept the default configuration and cross your fingers that it works for your purposes. And you're still not going to get away from the fundamentals of how docker works, if you find them troublesome for some reason. Updating a docker app with something like CasaOS is doing the same thing it would be with Portainer or the command line. I'm not quite sure what seems "wrong" about it to you, but it would be "wrong" in the same way no matter what front end you use. ---------------------------------------------------------------------- indykoning · 2023-10-29 20:10 It makes sense that you do not understand YAML if you compare it to an install script. YAML and a script are not the same thing. a YAML file is the same as a .ini file. It only contains configuration and makes sense for the application the configuration is for, not for any other program. But everything in docker is eventually a certain install script, these are the Dockerfile [https://github.com/azukaar/Cosmos- Server/blob/master/dockerfile](https://github.com/azukaar/Cosmos- Server/blob/master/dockerfile) read them, i bet you'll understand what they do ---------------------------------------------------------------------- linkthepirate · 2023-10-29 20:16 I don't recommend doing it on cron I've had breaking updates that way. But yeah compose and just do a pull like once a month or so, restart and make sure everything works still. ---------------------------------------------------------------------- schklom · 2023-10-29 20:26 > If you're fine with using the latest tag a simple cron that restarts and repulls your container every night at 03:00 and you are set. Why not pull from the tag `stable` instead when available, and keep the rest you mentioned? ---------------------------------------------------------------------- schklom · 2023-10-29 20:29 > it's not that I'm saying I can't learn another language, I just haven't yet You don't need to. YAML is made to be human-readable. Look at this example https://github.com/nextcloud/docker/blob/master/.examples/docker- compose/insecure/postgres/apache/docker-compose.yml, I dare you to tell me you have no idea what is described. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 20:52 Yes, totally understand all that and totally agree. I think I worded it badly but it was more of a "should I bother with e.g. CasaOS or just get into docker raw". I think the general consensus is the latter. Just wanted to make sure I wasn't missing anything obvious regarding making my life easier. ---------------------------------------------------------------------- Foxfyre · 2023-10-29 20:52 One thing you can definitely do is use ChatGPT to generate docker compose files for you. That being said, if you want to use something you should learn it at least enough to do the basics. Or find a OS that gives you an "App store" like Unraid does and basically does the hard part of docker for you. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 20:53 > It makes sense that you do not understand YAML if you compare it to an install script. > > > > YAML and a script are not the same thing. a YAML file is the same as a .ini file. OK fair enough but the point is I still need to modify them manually to set various things (in most examples I see anyway). ---------------------------------------------------------------------- tech2but1 · 2023-10-29 20:55 > Look at this example https://github.com/nextcloud/docker/blob/master/.examples/docker- compose/insecure/postgres/apache/docker-compose.yml, I dare you to tell me you have no idea what is described. That's a bit like me linking you to a passage from a book in a foreign language that I speak and you don't and saying "see, it's plain as anything"! ---------------------------------------------------------------------- vxLNX · 2023-10-29 21:29 - [YunoHost](https://yunohost.org/#/): Debian based distribution with ready to use "recipes" to deploy apps - [TurnKey](https://www.turnkeylinux.org/): ready to use linux containers. this works great if you have Proxmox. As you mentioned ESXi, I would strongly suggest you to check out Proxmox, because it can do both VMs, and LXCs. which would ease your way in containers, even though LXC have a different way of working with containers capabilities, than what Docker do. Have fun! ---------------------------------------------------------------------- ElevenNotes · 2023-10-29 21:48 Only a few images have tags like stable, most have latest. I wouldn't pull either of these personaly speaking. ---------------------------------------------------------------------- ElevenNotes · 2023-10-29 21:50 That's why I mentioned if OP wants to do it that way. I personaly make my own images of all containers I use. ---------------------------------------------------------------------- mattthebamf · 2023-10-29 21:52 This is why I use UnRAID personally. It makes docker wayyyyy easier IMO. But it doesn't really work as a VM, so it might not be great for you ---------------------------------------------------------------------- tech2but1 · 2023-10-29 21:59 Yeah I nailed my flag to the ESXi mast many years ago and am pretty much all in with it now. I also dropped onto Xpenology back then too and did try all the alternatives (incl. UnRAID) recently but didn't gel with any of them. ---------------------------------------------------------------------- tech2but1 · 2023-10-29 22:01 > One thing you can definitely do is use ChatGPT to generate docker compose files for you. I'm going to sound a bit of a dinosaur here but I've never even used or seen ChatGPT yet! ---------------------------------------------------------------------- Foxfyre · 2023-10-29 22:23 If and when you start using it, keep in mind that AI is only as smart as the information you give it. A command with very little detail won't yield good results. The key is *detail.* ---------------------------------------------------------------------- schklom · 2023-10-29 22:24 If you can script and remember that it is a configuration file, then you can understand the basics of that example. ---------------------------------------------------------------------- azukaar · 2023-10-29 23:25 one thing to consider is Cosmos even thought it does have a app store, is fully integrated into Docker. You can gradually transition to learning Docker by seeing how Cosmos creates your containers (even the app store shows you what compose file is being pushed), and it also picks up containers you created from the CLI. So you can create your container manually and then debug them in UI if you hit a wall for example (BTW I am completely subjective on the matter, as I am the dev of Cosmos :) ) ---------------------------------------------------------------------- throwawayacc201711 · 2023-10-29 23:42 what exactly did you find cumbersome for docker? 1. Write docker compose file for services 2. docker compose pull 3. docker compose run -d 4. docker compose down / restart 5. docker system prune Those 4 commands are all you need to update, start, shutdown/restart you services and the last one cleans out no in use images. ---------------------------------------------------------------------- AnApexBread · 2023-10-30 01:15 Portainer and Docker-Compose. ---------------------------------------------------------------------- Renkin42 · 2023-10-30 06:05 Personally I’ve been running docker via Unraid for about a year now and while it was easy I had very little understanding of what I was doing beyond following the instructions provided with the templates. About a month ago my Unraid machine nuked itself and rather than rebuild it as is I decided to take the opportunity to try something new and set up Ubuntu Server on a Raspberry Pi I had lying around and set up docker on it from the ground up. Terminal only. I did install portainer but I’ve only used it for monitoring, and tbh I could probably just shut it down at this point. I learned far more in a week of getting a few containers running than I did over months of running via a web ui. I actually started with pure docker run commands and then moved on to docker compose to get a fuller appreciation of the whole process. Honestly not knowing yaml won’t hurt you too much. Biggest thing that bites pretty much anyone going in is that yaml absolutely cares about whitespace. Keeping indentation consistent is essential. Once you get a feel for it it’s surprisingly intuitive. ---------------------------------------------------------------------- tech2but1 · 2023-10-30 09:12 Thank you. Yes I have been looking at doing it via CLI as I think my use of portainer last time actively hindered me working out what was going on. On the face of it adding a GUI is usually a bonus but I think you do need to fully understand docker first here. > Biggest thing that bites pretty much anyone going in is that yaml absolutely cares about whitespace. Yes, this is something I discovered after a while, a pet peeve of mine in general and annoying that it isn't more clearly pointed out as a downside of yaml! ---------------------------------------------------------------------- tech2but1 · 2023-10-30 09:18 I'm beginning to see a bit more clearly now, as I have mentioned elsewhere my original thoughts were portainer would make managing containers easier but I don't think it did, in fact I think it did the opposite which is why my ramblings here don't make sense to those that know docker. I'm starting again using the CLI, hopefully will get a better understanding of how it works this time round. ---------------------------------------------------------------------- tech2but1 · 2023-10-30 09:27 Thanks. Don't know if I'll jump straight in with it but it looks like it will be less of a hindrance than portainer was so definitely keeping this bookmarked. Certainly handy for the odd remote task, save trying to remember all the commands manually when away from the lab.