Why docker? reddit / selfhosted ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 03:46 The biggest problem is the disk occupation. Whatever portainer of others panels, they cannot allow me dispatch the storage location. Espacially the docker cost a high require of storage. I am a SLC/MLC believer, and i am always worry about the read/write consume cost by docker, because the folder locate in the system partition. Another misery is that many applications' set up script will pull many image and say nothing in the introdution. If i want to undo the installation, it is so hard to tell which one is foreign. The following is my personal technology stack rank of prefer to install. The difficulty of deploy is the key judgment: 1. TypeScript/Node/JavaScript —— Powerful package management. No compile requirement. Easy to customize, embed and reuse in personal projects. 2. Go —— One file and one command. 3. PHP —— No compile requirement. Easy to customize. Code fast. Abundant LNMP support tool. 4. Java —— Less files. Easy to run especialy springboot framework. But more and more project prefter front and rear separation. 5. Python —— No compile requirement. Easy to customize. But version problem is unbearable. The package management is centralized. Huge size packge will be download into the system disk (The root folder), espacially the AI app. All the kind of project above, I am using supervisor and LNMP panel to manage, and deside the location among my 3 SSDs and 6 HDDs. The .Docker and podman might be the trend, but in my humble oppinion, in most of senarion there is no need to use them. Native deployment can handle more and actually is not too hard, except something complex like Calibre and Jellyfin. Also I am looking for Alternative option of Calibre and Jellyfin. ​ ​ https://preview.redd.it/yakxxr1e974c1.png?width=915&format=png&auto=we bp&s=58fc3642d6677ccf65bcf568ddee1fa4f7843990 ---------------------------------------------------------------------- alphabuild · 2023-12-04 03:58 Your interpretation of how volumes work is incorrect. I have all my docker application data on a separate external drive not part of system. You might just need to get more familiar with the various configurations available from Docker to understand its advantages. Portability, network segmentation and service orchestration are all things I feel docker provides a lot of advantages. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 04:04 😢The data volume can be mapping, but the image files is incredible huge. I try to package my own custome container be it become 50Gb, and I swear I didn't bring many thing into it. The size is totally unpredicble. Also many projects deploy redundant mysql, redis and elastic search for the main application. All of this is duplication. 🤣 ---------------------------------------------------------------------- clintkev251 · 2023-12-04 04:09 >I try to package my own custome container but it become 50Gb, and I swear I didn't bring many thing into it. The size is totally unpredicble. Then you did something very wrong. Thats a crazy size. Image size should be very predictable as long as you're using a minimal dependency set and using multi-stage builds ---------------------------------------------------------------------- alphabuild · 2023-12-04 04:11 Post your dockerfile. I just checked my system. Have 13 containers running and images use only 8gb. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 04:17 I was just using docker commit I think... There is no dockerfile, My bad. But the problem still the same, the image or container file folder cannot be segment. Even I can use symbolic link to move the physic location, but ones the disk is full, the only way is to change a big one. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 04:19 > minimal dependency Well, this is the first time I meet this conception. Thank you. This might be a new long journey🤦‍♀️ ---------------------------------------------------------------------- LavaCreeperBOSSB · 2023-12-04 04:27 Because it's a lot easier to run multiple services when none of them use the same ports ---------------------------------------------------------------------- freedomlinux · 2023-12-04 04:30 Sorry, I think something is going wrong with your usage, but we don't understand what you have built. For my home usage, even a 500MB image would be "quite large". At work we have customers with 2-3GB images and I don't want anything bigger. Some examples of images I use at home: * 6MB - Alpine Linux + the PostgreSQL client * 20MB - a podcast downloader * 75MB - the NGINX web server + a demo page * 100MB - Python and the Backblaze B2 storage client * 150MB - the PostgreSQL database * 200MB - the Apache apache + PHP + a personal web site What's important is that these images only contain the software, not any large data. For example, the 150MB PostgreSQL database only includes the DB programs - the DB data is on a separate Volume that is not part of the image. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 04:36 I think the reason is my repeate docker commit command. I used to regard the docker as a trunk but not each stand alone site.😂 ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 04:37 This is an undeniable reason😥 ---------------------------------------------------------------------- Webbanditten · 2023-12-04 04:42 The size of the docker images are not unpredictable. Also duplication, redundancy and separation of concerns are all architectural choices you will face in the real world. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 04:48 Thank you, I seem to have gotten myself into some kind of misunderstanding. ---------------------------------------------------------------------- Vangoss05 · 2023-12-04 05:17 Why Docker? If i cock something up i just go into portainer and blow it away within 2 clicks and start over. Plus it adds a new level of management / status stuff. I tilt a wee bit towards docker since my entire email server runs on docker (mailcow) and have not had a single issue in the past 3 years with it. ---------------------------------------------------------------------- revereddesecration · 2023-12-04 05:42 https://docs.docker.com/engine/reference/commandline/commit/ Literally the very first paragraph of the page tells you not to use docker commit. ---------------------------------------------------------------------- dazchad · 2023-12-04 06:03 Docker solves, or tries to solve, distribution. Traditionally, if you wanted to deploys several services on the same machine, you had to make sure they were compatible with the host OS and versions (note that some projects might depend on distinct incompatible versions of the same dependency). Then came VMs and now you could have a whole OS for a single service, and life was good. Unfortunately VMs are not very flexible in regards to resource allocation. It is very easy to saturate a machines capacity with only a few VMs. Then came jails, chroot, cgroups and family, that let a single OS run binaries isolated from one another, while reusing the same kernel. Docker is a nice UX on top of this technology, essentially letting admins run arbitrary software in an allegedly secure and isolated way, without reserving specific resources to each instance. In sum docker is a lightweight VM-ish, one that isolated instances but uses the same kernel that better utilizes the available host resources. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 06:07 🤣🤣🤣🤣 what the.. Thank you! ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 06:10 You are right. I am using KVM, and it cost high memory occupation. But the image file can be set in different folder so that I can manage and expand the storage. I try hard to do the same in docker. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 06:15 It is a little bit weird because while I am using Portainer, Portainer itself is also a container. This means it is not like a supervised advanced management system. If Docker goes down, Portainer does not work. However, you're right; Portainer does offer a fantastic Docker management experience. ---------------------------------------------------------------------- ttkciar · 2023-12-04 06:44 Docker and Kubernetes are popular mostly because the industry has broadly given up on release engineering. This means applications/services can have different and conflicting dependencies, so the only way they can run on the same physical host is by putting each in their own containers or VM instances, each with their specific dependencies. The alternative is to have a platform with standard libraries, and to port applications to the platform, using the platform's libraries as their dependencies, and thus avoid conflict. This requires effort and discipline, so of course it is not very popular, though it was the standard practice twenty years ago. As far as I know the only Linux distribution which still follows the platform approach is Slackware. Applications which are ported to Slackware are guaranteed to work well together without conflicts, but not a lot of applications have been thus ported (Slackware only has about two thousand official packages, in all). ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-04 07:29 Wow. Thank you for introduction. 👍 I got the point now. ---------------------------------------------------------------------- rrrmmmrrrmmm · 2023-12-04 09:43 If you're looking for alternatives of Calibre and Jellyfin then storage of container image won't be an issue for you. Whatever you want to access with Jellyfin will be likely much larger than all of the container images that you're looking for combined. ---------------------------------------------------------------------- ssorgatem · 2023-12-04 10:31 Docker makes your life easier. You get working software with all their dependencies in one go, no need to worry about incompatibilities with other software, or updates, or versions of dependencies, etc. You can actually move your docker folder to a different drive or partition. If you're worried about disk writes, set up your docker directory on a Btrfs drive and use the Btrfs docker backend: it will leverage Btrfs snapshots and CoW capabilities for image creation and storage, which will see a reduction in space used. Even more so if your Btrfs filesystem has compression enabed. ---------------------------------------------------------------------- Mastodont_XXX · 2023-12-04 16:04 ... Native deployment can handle more and actually is not too hard ... You're right. Docker was originally designed to resolve conflicts between applications or libraries. Unfortunately, it has become a tool for deploying applications because people are terribly lazy and want everything at the click of a button. ---------------------------------------------------------------------- domanpanda · 2023-12-04 16:31 Seems like you have never worked with applications made of tenths of services, some of them multiplied/loadballanced. Managing deployment and rollbacks of such apps would be pure nightmare without containers and k8s. So it's not only about the conflicts. ---------------------------------------------------------------------- domanpanda · 2023-12-04 16:36 Kubernetes is popular because of some app 'isolation' but the fact that managing versioning, rollouts and rollbacks of apps made of tenths of hundreds of services (often multiplied, behind load balancers) would be pure nightmare. ---------------------------------------------------------------------- Mastodont_XXX · 2023-12-04 16:48 In big companies, yes. ---------------------------------------------------------------------- HappyCathode · 2023-12-04 20:00 I agree that installing brand new services on a brand new server can be quite easy, and it might seem like docker is overkill. But 2 years down the road, when trying to upgrade some python app from 3.8 to 3.10, good luck doing it witouth breaking the whole system. Managing dependancies is a LOT easier in docker containers. And yeah, you could have 20 VMs for 20 services, and have the same isolation advantage, right ? But then you have 20 kernels running on your host. It's a lot more efficient to have 1 or 2 hosts that have the docker containers running. Especially for low usage self hosted services. Regarding storage, you need to read more on it. You can mount a whole 4TB SSD drive just for your /home/user/.ssh folder if you want. You can control where docker stores it's stuff, just mount /var/lib/docker on a different drive. ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-05 02:49 Thank you for carefully reading my post. You are right; it stems from my lack of familiarity with Podman and Docker. I may indeed have some biased views based on limited achievements. Yesterday, I delved into the advanced features of Portainer, and Docker doesn't seem so bad after all.😊 ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-05 02:51 I'm nearly being driven crazy by Python, and even Anaconda has hardly changed the situation. It's time to give Docker a try.🤦‍♂️ ---------------------------------------------------------------------- No_Bee_7194 · 2023-12-05 02:53 Professional! Thank you for your expert advice and detailed guidance. I've learned a lot.😃 ---------------------------------------------------------------------- pusillanimouslist · 2023-12-08 05:19 Docker is popular because a lot of us use it in our professional roles, so we’re used to it. Also, disk space is cheap. ---------------------------------------------------------------------- InvaderToast348 · 2023-12-10 11:21 If your computer has a desktop environment, Docker Desktop is ok. I switched to portainer a few weeks ago out of personal preference and an issue with a specific container, but in 99% of cases DD is perfectly useable.