DEV Community

Cover image for Do you use Docker?
Madza
Madza Subscriber

Posted on

Do you use Docker?

Docker is a platform for building apps based on containers — small and lightweight execution environments that make shared use of the operating system kernel but otherwise run in isolation from one another.

Do you use Docker in your projects?

Latest comments (45)

Collapse
 
jacobmgevans profile image
Jacob Evans

Hell yes.
I want my local environment as close to identical to my prod environment as possible. I want no surprises with cop-outs like "Well it works on my machine?" or "Did you get the new .env file?"

The only thing I know that does this effectively is Docker.

Collapse
 
jacobmgevans profile image
Jacob Evans

Looks like on this thread people have other examples of tools that do a great job of this too, I have some additional reading up to do. Also anyone with resources to said alternatives please share ☺️

Collapse
 
kamiquasi profile image
Luke

Ditching Docker for podman and buildah has been a really nice experience. Having had issues with resource usage with Docker for a larger project in the past the change was noticeable. I'm a frontend dev, and using containers for things makes a lot of sense. I'm still trying to figure out k8s stuff, but have been able to create some small-footprint container images with the Universal Base Image, and host them on OpenShift. I really want to set up a more streamlined workflow using Che, but that has been slow for me to really wrap my brain around.

Collapse
 
demitroi profile image
Sergio Contreras Castañeda

I agree that it is not always necessary to use docker in simple projects. I have seen that many find it difficult because they lack knowledge of Linux and the technology in question (eg GO, Node, PHP, Python, etc.)

In my company we use it because we have projects in PHP and GO that use different versions each. In production we use it with docker compose to avoid dealing with different versions of databases.

Collapse
 
leandronsp profile image
Leandro Proença

I can’t see myself developing without containers

Collapse
 
baharajr profile image
Bennett(he/him)

I once I started using docker, I never knew how to stop.

Collapse
 
ertankara profile image
Ertan Kara

Only when shipping, if it would watch file changes and update itself I would use it while developing as well.

Collapse
 
averyfreeman profile image
Avery Freeman

I like docker, but I had been using podman because it's daemonless and can run containers as a user other than uid=0 - so it's a little lighter weight, and if a container's running under a user account (other than root), if someone WERE to compromise the container, they wouldn't automatically have root access.

I recently switched to systemd-container for hosting, though, because it's even more simple, and cut my memory usage for a NextJS app in half. Plus, it will run whatever OS structure is in a directory, so you can just extract cloud image tar (alpine, arch, etc.) under /var/lib/machines, stick your app wherever you want it in there, and access it like any other files on the system. It makes editing the files inside the container a lot more convenient, if you need to.

It's got a LOT more capabilities, but I wrote a whole long thing about the simplest way to do it here, if anybody's interested: serverfault.com/questions/957761/p...

Collapse
 
andreidascalu profile image
Andrei Dascalu

Been about 4 years since I've used Docker in 100% of my projects, both in dev as well as production and 6 years since I got in touch with containers.
Coincidentally about the same time span as I've been into Go.

Collapse
 
stojakovic99 profile image
Nikola Stojaković

Yes and I wonder why some people hesitate so much to use it. It makes life a lot easier and it's not hard to learn. I know only basic things and I'm still able to do pretty much everything I need (and for everything else documentation and SO can help).

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha

I started using docker because I wanted to use PHP 7.0 but my os repos were stuck on php 5.6, Now I am using docker because I want to use PHP 8.0 but my current os (Solus) prefer last LTS i.e PHP 7.4.

Docker also fueled my distro-hopping days, I moved all my node, php, java projects to docker and it didn't matter which os I am on. It also helped improve team project.

Unfortunately, so far I have only used docker for local development, I haven't used docker for production, deployment. So my skills and knowledge with dockers are pretty low.

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha

Another weird hobby that docker fueled was during lockdown, when I suddenly had urge to learn ancient languages, I learned Cobol, Pascal with docker. My os repository didn't have them. I was able to find exact version which was used in tutorials.