r/docker • • Aug 12 '24

What are you using docker for?

Hay I'm new to docker and just want a better understanding of hoow it is useful . Thanks

Hay I'm

1 Upvotes

31 comments sorted by

16

u/Tiny-Ad-7590 Aug 12 '24 edited Aug 12 '24

I'm upskilling in this area, so if someone with more experience than me has other ideas, absolutely listen to them.

I'm using docker to:

  1. Deliver software in functional modular units (images) that can be deployed to the cloud in a way where every component can flexibily scale horizontally out (adding more containers) or in (removing containers) as needed.

  2. Provide a consistent build environment for every build of the software by building inside the docker file itself.

  3. Stand up a virtual development environment on any development machine (via docker compose), such that every developer is able to attach their IDE to the debugger inside the container to development test and debug the software while it is running in an environment that is identical to how the software will run in production. This removes the "it worked on my machine" issue.

  4. Provide the ability to stand up a virtual test environment inside my CI/CD pipleine (also via docker compose) such that I can automatically run a battery of scans and integration tests against that software prior to it being delivered anywhere.

  5. Provide the ability to run a docker container as if it were a command line tool, such that any dependencies needed by that "tool" are automatically contained inside the image. This reduces the dependencies for the server to just a) running docker, b) having permissions/access to pull the image prior to running it, and c) having enough compute/memory resource to run the image effectively. This is a massive reduction in the level of environmental-bullshit-that-can-potentially-go-wrong that you have to deal with.

Let me know if you'd like me to expand on any of those. Trying hard to not huge-wall-of-text at you.

1

u/Vincent-Thomas Aug 13 '24

You should checkout nix flakes and ”nix develop” for att better version of number 2

14

u/sonickony Aug 12 '24

I am too lazy to install and configure things on the host machine every time.

4

u/slowmotionrunner Aug 13 '24

I use it for almost all of my workloads with as little installed on the host as possible. Primary reason is to keep the host system clean. I’m decent in my knowledge of Linux but by no means an expert. Plenty of times I’ve borked the host because of some mistake. Docker helps me avoid that and isolate my mistakes.

4

u/OMIGHTY1 Aug 13 '24

Lightweight hosting of my homelab services.

2

u/Nintenuendo_ Aug 13 '24

I use it for all this crap including the web server, and because setting it all up on bare metal would really suck in every conceivable way.

Now I just use gitea to track changes in my yaml stacks when I do new stuff, backup my /config persistant volume mounted configuration files, and can move everything to a new system or come back from a fuckup in record speed

Shit, with my gitea I could script the whole thing if I was the hands off type

2

u/ucrbuffalo Aug 13 '24

Did you build that dashboard from scratch, or is that something I can use too?

1

u/Nintenuendo_ Aug 13 '24

I built it from scratch!

If you click on my gitea there should be one public repo, you can grab the source from there!

Go nuts and enjoy! It's a good starting point if you wanna modify the shit out of it and come up with something unique

2

u/ucrbuffalo Aug 13 '24

That sounds awesome for someone else. 😅😅 I’m not looking for something where I’ll have to mess with the code. I need something with an easy to use GUI instead. I’m just not in a season where I want to learn that right now. Someday, maybe. Just not now.

1

u/Nintenuendo_ Aug 13 '24 edited Aug 13 '24

Agreed, we'll if you can edit the index.html and replace the welcome text, the website name, and just replace the filename of the icon picture you want, then you can use this and be done. All just text.

No need to learn html, css and Javascript, it's already all done, just replacing content, or removing completely the blocks of text that represent new boxes for the services

The website template will automatically resize your display to compensate for missing or added boxes, and will resize automatically for all displays, mobile and tablet

2

u/YUL438 Aug 13 '24

very cool. i’m in the process of gearing up do a plex / ARR / homelab sever on Linux. so you’ve made it so you can access your media server and programs remotely from anywhere?

1

u/Nintenuendo_ Aug 13 '24 edited Aug 13 '24

Yup, and just incase I want to access my services NOT through the web server I also have a wireguard backdoor for emergencies so I can access services through a lan ip/port like at home.

Very convenient to not need an app or software to access everything from any device with a screen and internet connection

It's a convenient place for overseerr aswell, so friends and family have a super easy place to go to make sure stuff they want shows up on plex without me getting a text about it

1

u/YUL438 Aug 13 '24

thanks the reply, very cool idea. do you have a guide or instructions on how to setup something like this?

1

u/ChronicallySilly Aug 13 '24

This is wild, but is this safe? Clicking on your qbittorent or or file browser squares pop up a login box. That sounds terrifying. Wouldn't whitelisting IPs and using a VPN to your home connection be best here?

No doubt you know what you're doing, I'm just asking to learn

1

u/DiMarcoTheGawd Aug 15 '24

I would like to know as well. Something something brute forcing a password I’m a noob as well.

2

u/DuckDatum Aug 13 '24 edited Aug 12 '25

heavy pocket connect cow birds tub oil wise hobbies fragile

This post was mass deleted and anonymized with Redact

2

u/Murky-Sector Aug 13 '24

cause I can make a lot of money doing it

1

u/ajunior7 Aug 13 '24 edited Aug 13 '24
  1. Run self hosted Discord bots

  2. Use VSCode’s Dev Containers so I can remote in to my development server running a dev container in my project folder so I can do work on any machine without worrying about installing dependencies

  3. Self host other services on my server

  4. Create containerized CI/CD runners for my projects with a remote repo

Many of these points hinge on the fact that I don’t have to deal with “dependency hell”, and I could run as many services as I want without any of them clashing with each other for some unknown reason. If a container breaks, then that mess is isolated in its own environment and doesn’t take down my entire server. In which I then diagnose and restart the container.

1

u/Pucci800 Aug 13 '24

use it to organize apps and dependencies still learning but I like to have things in one neat and organized place or at least try to have it that way.

1

u/OkAngle2353 Aug 13 '24

It's very useful. I personally recommend you manage your containers with portainer.

1

u/[deleted] Aug 13 '24 edited Aug 13 '24
  1. Simplify deployment of services like a Translation Service (LibreTranslate), an LLM service (Ollama), and databases (PostgreSQL, PgAdmin), a geospatial basemap server (OpenStreetMap).

  2. Track configurations (nearly every CLI flag, folder path, service version, are inside a Docker Compose script), and committing it to Git

  3. Reduce variation of different deployment environments by bundling things into the image (different NVIDIA drivers, multiple versions of Python, using different OS)

1

u/bunglegrind1 Aug 13 '24

To have a homogeneous development environment

1

u/msanangelo Aug 13 '24

anything and everything that I can. makes it far easier to replicate when the compose script has everything spelled out for me and less dependant of the host OS being compatible with some software.

just define the volumes and networking and I'm off to the races. sometimes it might take a few hours to get the compose script right but once I do, it's golden.

1

u/Pesoen Aug 13 '24

i love how easy it is to work with.

almost all my stuff is in docker containers(most is moved over to stacks at this point as well)

it's just super easy to move around between images, and features. often the images are able to run on multiple systems, regardless of specs and stuff. so my army of raspberry pi's can run almost all my stuff(only thing i have yet to get working, is an email server)
setup is a breeze, most things can be configured using environment variables, instead of looking around in a config file located in one place for some settings, and another config file in another place for the rest.
and if you don't like an image, it's missing a feature, or something is not working how you expected it to, just find another image, and try that. as long as you get it from docker hub, you can be sure there is nothing malicious, and most images are clean on github as well.

1

u/Darkomen78 Aug 13 '24

In a pro way, I use it to deploy some premade image like munkireport (inventory macOS), caddy (reverse proxy), psitransfer (WeTransfer like) and other stuff like grafana/prometheus. At home, I deploy Radarr, Sonarr and others tools like that, adguard home (pihole like) and unpoller (better stats and monitoring on UniFi)

1

u/titpetric Aug 13 '24

for testing environments dependencies, custom build environments, ci tooling image with binaries, dev builds from source, release packaging, hosting my blog and some databases, data mining, etl pipelines, ci, gitea...

anything cloud usually means docker to have it run inside k8s/helm deployments, great for self hosting, great for manual scaling if you add a few instances, it's my strong held belief that people make some ridiculously solid deployments to multiple hosts using ssh rsync and docker compose to orchestrate their sub-unicorn infra

pov: go engineer, strong devops history, wrote task-ui to scratch my deployment itches.

1

u/Cystem Aug 13 '24

Everything

1

u/L3KTRO Aug 14 '24

Hosting more than 40 containers of my homelab (and some devs stuff)