10
xxzer0
3y

Everyone talking about Docker as the next big step in productivity. I still miss why Docker is so useful, to be honest, I see it as a "micro-vm " running your own software.

I have used this technology before but I really struggle to see where I could apply it usefully.

At this point, I'm thinking I'm just too naive about the issues it solves. So lemme go straight to the point:

1. How does Docker speed up your productivity?
2. How do you use it?

Comments
  • 4
    It's useful because it allows you to easily switch between multiple different runtime systems and compartmentalize dev deps from your desktop environment.
    And yes, it's a "micro-vm" but that's the power. It ensures that you and your collegues have the same runtime when you develop and you can even deploy it in the end without having special "if prod"-config (naturally you do want a different run container setup from dev but I think you get the point)
  • 4
    Dockerfiles are relatively easy to write, distribute, and are reproducible,

    docker-compose makes it super easy to specify safe(r) isolated networks for groups of services (e.g. something outside of your compose file can't access the database (unless you explicitly allow it to, duh))
  • 3
    @hobblin So you use Docker even for the development? I thought it was just a "deploy thing". Pretty new to me. Uhm, I'll look around then. Thanks a lot for your feedback.
  • 2
    It allows me to quickly run all kinds of things (think wordpress, nextcloud) without having to modify my main system. If I'm bored and reinstall my server OS, I just have to run docker-compose up to get all my stuff back :P
  • 2
    @synemeup So basically you are making a reproducible configuration to deploy your services everywhere you want without running in OS-related issues. Isn't it? That's why you mentioned Dockerfiles in your last comment. Pretty insightful, thanks a lot.
  • 2
    I just used one to create an environment that was almost impossible to recreate modernly, as it was a Psp dev package and the setup for it was long lost to time. The community is dead, no help there. However, someone created a psp dev docker file that automagically creates a nice snapshot of a specific environment to compile it. Also, I did it on Windows. That's why Docker is powerful imo :)

    would've literally been impossible to compile my code for the psp without that docker file in 2021
  • 1
    @genevra Thanks a lot for your time, really useful example.
  • 2
    im a student and im learning server stuff.

    it means i break things. alot.

    with dockerfiles its a breeze to rebuild a virtual machine: im not sure if it is true for all os'es, but for linux it seems docker takes care of interactive installation prompts.

    otherwise its distribution dependent and somewhat painfull.

    no configuring of the vm itself (shared folders) to initially copy files.

    all in all it reduces time between iterations for me from ~1hr mindless clicking to 15mins unattended.

    also it is good if you got limited ressources on your computer like if you work on a laptop because you dont need to partition those
  • 1
    @bad-frog woah, nice one, thanks for sharing
  • 1
    @xxzer0 well, development as in running the application during development, not as in running the IDE in docker or anything like that.
  • 0
    @hobblin Yes, I got u :D
  • 2
    Developing in docker prevents me from polluting my host system with dependencies. It also allows me from requiring a manually configured environment in deployment.

    It has completely eliminated the "It works for me!" comment that co-workers give each other when something isn't reproducible, because now if the container is running, its the same environment.
  • 1
    @lungdart As always, thanks for sharing. I appreciate your time.
  • 2
    Take note that Docker is a light container in Linux so it works as expected (using fewer resources).

    However, it does not happens in Windows and macOS. Docker in both is virtual machines!. Microsoft claims that Docker in Windows is slim (for a virtual machine) but it is still a virtual machine using tons of resources. In my experience, Dockers in Windows is a resource hog and VMWare and VirtualBox uses fewer resources. In MacOS is the same thing.
  • 1
    Docker is meant to be used only of you deploy to containers.

    If you only want to get rid of the dependency problem you should use a VM, for instance vagrant is easier and faster to setup than docker, more flexible even.
  • 1
    First time I got truly impressed by Docker was with ESPHome. Imagine you need to compile firmware for an IoT device, so you just download their container, pass it the .yaml configuration and serial port, execute and it compiles and flashes the fw for you.

    Not having to setup own environment to compile, to deal with dependencies, to resolve issues when some packages gets updated ... it makes life so much easier.
  • 0
    Container, I contain the shit so you know what it affects and not polluting the rest of the system which forces development of proper interfaces and not hacked together "solutions"
Add Comment