7 ms·
Docker going strong :-) Unsurprising, really. The usefulness of it cannot be overstated. Doesn't even matter if its used anywhere in the deployment chain; sim
by usrbinbash 4y ago
Docker going strong :-)
Unsurprising, really. The usefulness of it cannot be overstated.
Doesn't even matter if its used anywhere in the deployment chain; simply having the ability to pull up a replica of almost any *nix environment on my laptop in mere seconds, using it for tests, and then throwing it away resetting it again in mere seconds is beyond awesome, no matter if what I'm working on then goes into a huge complicated deployment chain, or is shoved onto some on-premises, zero-abstractions, baremetal server.
And how is it all configured? Plain text files. How is it controlled? Command Line. Meaning I can script it every way I want, using the tools I already have and use. Doesn't get in the way, doesn't demand that I work around it...it works with me and my tools in the same way they already work together.
Oh, and of course, good bye and good riddance to the days when I had to install and configure local RDMS for tests. Everything I use has an official image, so I just write some small setup script, a Dockerfile, knit everything together in a docker-compose.yml and presto, done: Application stack is up and running.
To me, Docker is as essential as my text editor these days.
- _ZeD_ 4y ago> Unsurprising, really. The usefulness of it cannot be overstated. meh, I can count on my hand the times it was useful to me. oh, and having to deal with docker desktop is not fun
- plonk 4y ago> oh, and having to deal with docker desktop is not fun To stay sane, just forget it exists until it crashes irretrievably, then reinstall it and repeat. Containers and images being disposable is the whole point anyway.
- umvi 4y agoWell yeah, Docker + Windows isn't the best experience. I recommend WSL if you must go down that route.
- GordonS 4y agoIt used to be a bit flakey pre-WSL2 integration ~2-3 years back - it's been absolutely rock solid for me on Windows since then, just like on Linux.
- skinnyarms 4y agoSame, I can't even remember the last time it's crashed for me or anybody on my team.
- folkrav 4y agoYou don't even have to bother with Docker Desktop these days, you can start it in `/etc/wsl.conf` directly with `service start docker` and forget about it, it'll start with the VM. I think this is a rather new feature though.
- tester756 4y agoI wish installing Docker inside WSL2 wasn't so problematic - the networking part to make it work is messy
- philliphaydon 4y agoUnless docker desktop is installed I have no idea how to deal with the changing IP of WSL which is just painful.
- swyx 4y agofwiw you can run docker without docker desktop now https://www.swyx.io/running-docker-without-docker-desktop/ https://www.swyx.io/running-docker-without-docker-desktop/
- systematical 4y agoYeah at work on Mac docker desktop isn't fun. At home on Linux Docker is easy. How Mac won mindshare, woof.
- melony 4y agoExcept when it comes to paying for it. Developer tooling is still a dead end business model if you are not subsidized by a bigger company.
- fragmede 4y agoSeriously. Look at how much blowback $10/month for Github Copilot got. $10! I don't know everyone's financial status, but from where I'm sitting, $10/month for that is cheap.
- selcuka 4y agoIt's about the value, not the cost. You can get VSCode for free, or JetBrains Professional IDEs for about $10/month (after 2nd year). People just don't agree that Copilot has value comparable to those yet.
- marcosdumay 4y ago> People just don't agree that Copilot has value You can stop it there. All the comments I've read complaining about the price were saying basically that. One even explicitly said that if it was cheaper he'd buy it for fun, but since it provided no value, he wouldn't... just to get a thread of people complaining that the price shouldn't change his opinion.
- fragmede 4y agoBack of the envelope this though. Lets say a programmer makes $60/hr, or $120k/yr. Lets say Copilot replaces 5 minutes of googling around to find the right stack overflow answer and copy and paste and adapt it to fit. Copilot just has to do that twice in a whole month to be worth $10/month.
- selcuka 4y agoI don't disagree, but as I said, it's about comparative value to other tools. Any first world developer can afford $10/month. That being said, if you are a full time employee you won't magically earn an extra $10 a month for using Copilot, you will only be more productive. It will benefit your employer and Copilot doesn't have an enterprise subscription yet.
- KronisLV 4y ago> Unsurprising, really. The usefulness of it cannot be overstated. Furthermore, in addition to the points you mentioned, it also lets us: - trivially remap ports to whatever we want (and expose whichever we'd like to the outside) - easily set resource limits, so your instance of MariaDB doesn't bring the whole server down and make it unresponsive - abstract away storage, in case you want a specific directory for your backups instead of following HFS (say, just have /app, treating the rest of the server as throwaway) - perhaps most importantly, your host OS is now separate from the actual containers that you are running, updating/redeploying either becomes a breeze Recently, I actually decided to build my own containers for all of my personal use cases and it's been an interesting experience: I base everything on a LTS version of Ubuntu and just use apt for getting all of the runtimes (Node, Java, .NET, PHP, Ruby, Python, ...) for my own software, and so far it's a nice experience. All I need is the base Ubuntu image from Docker Hub and the rest is up to me and the regular mirrors/repositories for the software packages in question, most of which can be stored on my own Nexus instance as needed, as well as the whole build process is primarily driven through Gitea, Drone CI and a few "servers" (repurposed old computers with passive cooling) that I have on my desk. Though for now I also use Bitnami images for databases and such, which are also decent and which I largely just cache on my end: https://bitnami.com/stacks/containers https://bitnami.com/stacks/containers So what I'm trying to say, is that there's a lot of flexibility that you can enjoy, both in making your own "templates" for web servers, programming languages, build toolchains etc., as well as you can grab pre-made stuff that other people have made, be it on Docker Hub, someone's Nexus/Artifactory/Harbor instance or another registry out there. Docker and other OCI compatible tools have largely achieved the sort of adoption and widespread usage that projects like Nix and Guix could also benefit from.
- Taywee 4y agoI find for builds especially it's invaluable. I have a Makefile that builds Docker images and runs build processes for all 4 supported versions of Debian, 3 LTS versions of Ubuntu, RHEL7, and Fedora 35 and 36. It builds and packages the software on all of these, giving me debs and rpms for every relevant distro ("relevant" meaning distros used for servers or workstations for any of our employees and clients). I then have another set of docker images for making package repositories and signing everything. I do have a lot of mostly-redundant dockerfiles in some places, but in others I've managed to leverage m4 to reduce the redundancy (though I'm trying to keep it as slim as possible to avoid the pain of turning everything into a convoluted set of impossible-to-maintain macros). Before this, I was using Vagrant and Ansible for builds, which was slow, memory hungry, and frustrating to debug. Not to mention that dependencies that needed to be built statically couldn't be easily cached, which comes out of the box with Docker.
- mythrwy 4y agoNot denying the potential usefulness, but I've seen a lot of time get lost to faffing around with Docker when it completely added nothing at all.
- mynameisash 4y agoI sorta learned a little about Docker+Kubernetes on a previous project, and it was a nightmare. I don't have a good mental delineation between the two products because the whole thing was a trainwreck, though I'm inclined to think that 95% of the horribleness was K8s. That said, I also don't remember the Docker documentation to be very good. For someone that doesn't work with it professionally, what's a good starting point to learn Docker well?
- tacker2000 4y agoThough k8s works with docker, you shouldnt need to use it off the bat, especially in the beginning without having lots of experience with docker itself. Most projects dont need k8s and i personally have never used it. I agree the docker docs are lacking, i basically learned everything by googling stuff, stack overflow and reading some blog posts
- deleted 4y ago[deleted]
- EnKopVand 4y agoAre you sure you need to learn Docker well? I ask this because I use docker on a daily basis, but I rarely actually “use” docker. What I mean by this is that we deploy everything using docker, but it’s handled by our DevOps pipeline and the “docker” part is really just a dockerfile that is typically given to us by our cloud vendor. I think the only thing I’ve changed in ours for nodejs, c#, Python and go images is the image version they get build with. Lets say I want to write a typescript microservice and deploy it to azure as a serverless functions app. I’ll fork our bare metal nodejs project for azure functions, which is essentially the standard azure cli “create nodejs function -typescript -docker” (this isn’t correct syntax but you get it) with the linting and ts-compiling rules we use on all our projects (and an updated image version in the docker file as mentioned). While I build things and run them locally, I don’t use docker, it’s not until I actually want to deploy to azure and setup the release pipeline and trigger it that docker comes into play, but those DevOps steps (also streamlined) aren’t really docker heavy as they simply use the dockerfile that was mostly provided by Microsoft. I can certainly build and run my micro service as a docker container locally, but I don’t need to. In fact the only times I did was when it failed to build during the azure pipeline but it turned out to be the azure container registry access controls every single time that happened, so these days I almost never “use” docker. In fact I use it so rarely I almost always have to Google command lines. I know people use docker in many different ways, and that many use things like docker compose, but my point is that you can deploy everything you build with docker and never actually have to care much about docker itself. So maybe you should ask yourself if you really need to learn docker good before you spend too much time on it.
- scarface74 4y agoOne of my updated “Joel Test” job requirements is “do you give each developer access to a dev cloud account with fairly wide guardrails.” I would much rather just spin up all my resources on a dev cloud account using CloudFormation/Terraform, and spend them down when I’m done. Before I get (rightfully) called out. Yes I work at AWS now. But I also found that just as appealing three years ago when I worked at a 60 person company.
- lmarcos 4y ago> simply having the ability to pull up a replica of almost any *nix environment on my laptop Umm, I struggle with that. I have Ubuntu machines that run in production. They are VMs that run systemd for some stuff and Docker containers for others. The only way to (easily) replicate such machines on my laptop is via VMs (e.g., Vagrant + VMware), not via Docker only. I do use Docker a lot... Inside VMs.
- chrischattin 4y agoThis is the opposite of my experience. Docker is a headache to work with for zero tangible benefit. It slows development down by adding an unnecessary layer to the stack.
- zmxz 4y agoYou didn't write anything about your experience or your knowledge level, so it's impossible to conclude anything useful or tangible about your experience. Wouldn't you agree?
- chrischattin 4y agoI’ve worked with full stack Rails for 10+ years. Built and sold two startups of my own, and wrote the code for two others that were acquired, among other things. I have a ton of practical experience on the topic.
- khoahuynh 4y ago
- toastal 4y agoAnd yet here I am having used Docker like 3 times. I've used Heroku, Nix, or even just versions through asdf if necessary and been fine—though Nix is the only truly reproducible option here. None of these options involved containers or overhead.
- seabrookmx 4y agoWhat overhead?
- mulmen 4y agoThe virtual machine?
- mandarax8 4y agoWhat virtual machine?
- city41 4y agoDocker requires a Linux VM when not ran on Linux.
- noisem4ker 4y ago... unless you're running Windows containers (on Windows).
- KronisLV 4y ago> ... unless you're running Windows containers (on Windows). But aren't most Windows containers a bit on the heavier side? And don't you then need to also use the whole MS server setup for deploying your stuff to prod, which is a no-no in certain settings? Edit: provided that you can even find an image for the software you need (from an official provider/latest versions/with proper instructions and source). Consider the following: - https://hub.docker.com/search?q=postgres&operating_system=windows - https://hub.docker.com/search?q=postgres&operating_system=linux Then again, WSL2 is pretty okay for running *nix based OCI containers, apart from the file permissions (SSH keys and anything like that is a pain, especially with bind mounts). Even a Hyper-V VM was a decent choice, though any sort of a performance overhead was also negligible - I've heard the story being worse on OS X in regards to disk performance, though not sure whether that's still relevant. The worst thing about Docker on Windows has generally been the weird bind mount syntax for the Windows file system paths (not too bad, to be honest) as well as the whole file permission thing, as well as the Hyper-V approach eating some of your RAM in the background. Apart from that, it's mostly passable, though Docker/Podman on *nix is comparatively painless. Though I could say that about most development ecosystems, from PHP to Java. Windows is just generally better for certain classes of desktop software and gaming, *nix is generally better for most development related tasks and servers. /opinion