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?
For further actions, you may consider blocking this person and/or reporting abuse
I absolutely have to use Docker, when there are build dependencies, like platform specific installs, and Makefiles. Like Golang sometimes, and native postgresql extensions.
I wonder if I can use Docker to run non-web GUI apps. I want to avoid VirtualBox.
Of course, I realize that VSCode can be dockerized, but I haven't tried it.
You can easily do this on Linux by mounting the x11 socket. For other platforms it isn't so simple.
Please elaborate / suggest an article...
Like Xorg on different ports?
You can use the same Xorg instance:
I am on GNOME40 on Xorg.
Maybe its related to me being on rootless docker? Might be that you need to create a user with the same uid as the host for your case.
Nope, luckily the hardware we use is sufficient to run everything we need, our projects simple enough to not need to be containerised.
Often people do use it when it's not needed - as far as I'm aware it wasn't designed to be used as a development environment.
100% great tool with perfect use cases, but often found people use it when just not needed. Can imagine many basic NextJS or WordPress being built using it xD
It makes sense to use even for a nextjs site because you can ensure everyone is running the same thing locally. If you work on a team with people using different platforms virtualization is a good option and compose is easier to get up and running with than vagrant.
Your make my point exactly there by following dogma without first assessing the real situation.
Why does it matter that everybody is running the same thing locally? Who cares if somebody is on windows, somebody is on linux?
If the code committed to version control is accurate and the machines can run the code, then there's no issues and there's no need for over-engineering with virtualisation.
As per my original message, it's not "needed" unless you have complexities in your project which means your host machine cannot run it adequately.
It matters because some people will run into problems that others aren't. It solves a very real problem that I've encountered far too many times in my career.
What you're suggesting that due to incompatibilities between your team that you decided to use it to solve that issue.
That's my point - You used it to solve a specific issue on your team.
That is NOT justification for using it for everything "just because" - as most of the time there won't be a need, for example I've been developing a mixture of LAMP/JAM projects for around 20 years - never "needed" it - Yes there's times we could have used it. But never "needed" it.
This is the important information, the difference between "needing it" and "using it".
My experience with this is very different from yours. Lets just leave it as that.
Yes, in my opinion it is really basic tool in a development. Someone who doesn't use docker probably doesn't have much experience. Do you image this hell when you work with several apps on different stack and you would have to install locally all dependencies?
Nowadays I work almost exclusively with one stack, and so I'm not using Docker anymore (I used it before), as there is no real need for me to do so :-) ... but, Docker is a great piece of technology!
When I install a program not written by myself and not in the default APT repository, I'll try to install it inside Docker, to reduce the chance it messes up my servers.
I'm adding Dockerfile to some of my own programs too, so that I don't need to explain how to install dependencies.
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.
I cant force myself to migrate from vagrant to docker. Docker really fills over-engineered and unnecessary complicated to use. I really need to find some good graphical program to manage all those docker machines just to avoid writing all those switches in terminal :P
Portainer is a web GUI for controlling Docker.
lowendspirit.com/portainer-a-docke...
(I never used it)
Portainer is recommended. Easy to install, easy to work with for beginners and seems full featured.
Use it for most of my projects, especially when there are external dependencies or specific extensions required for what I build. Also for providing consistent test environments and to replicate those into production.
I'm using it right now!
My home/personal infrastructure has mostly transitioned to docker images deployed with Octopus Deploy.
The quick drop, start cycle is handy, even when getting things to run in a container can be time consuming.
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.
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.
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).
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.
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.
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.
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 ☺️
Yes, it makes it easy to ensure everyone has the same services locally. If you specify a postgresql database of version 12.6, docker-compose will make sure everyone is running this locally.
well cant imagine my self without docker
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...
Yes. I usually use the Docker to containerize my personal and business services and projects.
And I also consider/research the Kubernetes to make my Docker container scalable conveniently on distributed virtual machines.
Only when shipping, if it would watch file changes and update itself I would use it while developing as well.
I once I started using docker, I never knew how to stop.
I can’t see myself developing without containers
Yes i do use docker to containerize my application then deploy that on Kubernetes
Yep specially if I want to run it locally. It is very handful.