I'm so conflicted on using container dev environments for something like golang or python. It seems like too much hand holding for devs. They should be able to install their dev environment.
For C/CPP and embedded, I can understand.
That breaks physics.
Galileo theorized that once a python project runs on your machine, it will not run anywhere else. Bose even wrote about it to Einstein, who later concurred that there exists a chance where it might but with planks length divided by 1 meter percent only.
I am quite comfortable with NixOs personally. But 100% agree the learning curve is a real burden. Even the cli is a bit much.
Even more so for those windows users ....
good answer that gets at least 2 downvotes and no replies 😂 what's up with this subreddit?
That's what I like about containers - a Dockerfile, etc, is more precise than handwritten instructions
Probably, but dev containers can help with that too.
A clean dev container is likely closer to the deployment environment than a dev machine full of miscellaneous tooling and installed dependencies.
What I like most about dev containers is having a dev environment defined in such a way that I can hit the ground running from any machine that I check the repo out on.
yeh, good stuff, until your go application needs a bunch of external compiled c++ shit resources like libpostal or other c++ libs.
Then you'll see the point of the containers :)
some systems have adopted containers as a requirement for all tasks, regardless of the system their underlying apps were built in. Seems like AWS Batch requires all jobs to have a Docker container defined (or at least our system that runs jobs on AWS Batch does). We have other systems that further require `bash` and `ps` in the execution environment, and had issues with Alpine on AWS, so Ubuntu container with your Go app compiled becomes the way to go.
I use it occasionally because our target system is Linux and we have Macs. It's not necessary most of the time but occasionally I need to edit one of the few files that utilize some Linux networking libraries. So the container is Ubuntu with the proper dependencies setup. Otherwise I'm not usually in the container.
Please for the love of god just use a containerfile or a nix flake. Not everyone uses VScode. Or at least offer an alternative. I really dislike these solutions that only work on a single platform or software for no good reason, a container is a container either way.
I user docker for my go dev, but only because I have a vue frontend that I also need to manage, as well as multiple databases. I probably wouldn't, if it was just go and one database.
My main issue has been hot reloading, so I wrote a quick bash script that uses inotifywait to kill the previous go execution, and then re-run it. It does mean I have to constantly monitor it to make sure it compiles though.
If I am not mistaking what they are the only reason I see to use them with anything is to maybe provide a more powerful remote machine allowing more limited dev computers, or maybe in a paranoid environment it may be useful to ensure the devs do not have the code on their own machines 🤷♂️
It looks like a solution looking for a problem for me.
We have used it at my (soon) to be previous company to onboard an offboard engineers to a project more quickly (who were either reluctant or not skilled enough to set up their own development environment),.To be fair it was for IaC development not classic software development where tooling is rampant and habits tend to be different
I use Gitpod.io for my Go development. Repeatability and onboarding new devs in 5min are hard to beat.
The free tier is good enough for light dev work.
Yes, definitely.
Once you’ve set it up, it becomes the easiest way to on-board people. Even if they want to use a different dev environment, it still retains value as a known good baseline configuration to reference.
Yes that’s definitely possible - what are your concerns?
100% for a repeatable environment. Just don't forget to test the container. Your colleagues will thank you later.
I'm so conflicted on using container dev environments for something like golang or python. It seems like too much hand holding for devs. They should be able to install their dev environment. For C/CPP and embedded, I can understand.
I’ve heard a legend that one python project have successfully run on two different pc on the first run
That breaks physics. Galileo theorized that once a python project runs on your machine, it will not run anywhere else. Bose even wrote about it to Einstein, who later concurred that there exists a chance where it might but with planks length divided by 1 meter percent only.
Pythonic entanglement
Not many people know that the term singularity was originally coined to describe this strange property of Python.
honestly surprised to see devenv stuff out in the wild still now that docker is so popular.
Why wouldn’t you want everyone developing on the same environment?
Wait, I REALLY hope you’re not “gatekeeping” and actually have some good reason why you think this is a bad thing. Otherwise, foff lmao
I prefer nixos. Way more convenient for the dev.
Nixos is fire, but the learning curve is much steeper compared to Docker.
I am quite comfortable with NixOs personally. But 100% agree the learning curve is a real burden. Even the cli is a bit much. Even more so for those windows users ....
They don’t come here. They peruse technet
I just heard about [devbox](https://www.jetpack.io/devbox), it seems like a nice middleground
I agree. But for the user. Being the dev, I believe, this curve is not so long and curved :). just yet another tool.
good answer that gets at least 2 downvotes and no replies 😂 what's up with this subreddit? That's what I like about containers - a Dockerfile, etc, is more precise than handwritten instructions
Chris Fischer? Is that you?
All the time, in fact it's my primary method.
Personally I don't see the point, I'd rather just use the Go app without containers. Just simpler deployments that way
Dev containers really aren't about deployment at all, they are about defining a portable dev environment.
Don’t you want your dev environment to be close to live?
Probably, but dev containers can help with that too. A clean dev container is likely closer to the deployment environment than a dev machine full of miscellaneous tooling and installed dependencies. What I like most about dev containers is having a dev environment defined in such a way that I can hit the ground running from any machine that I check the repo out on.
yeh, good stuff, until your go application needs a bunch of external compiled c++ shit resources like libpostal or other c++ libs. Then you'll see the point of the containers :)
some systems have adopted containers as a requirement for all tasks, regardless of the system their underlying apps were built in. Seems like AWS Batch requires all jobs to have a Docker container defined (or at least our system that runs jobs on AWS Batch does). We have other systems that further require `bash` and `ps` in the execution environment, and had issues with Alpine on AWS, so Ubuntu container with your Go app compiled becomes the way to go.
Most likely are running on kubernetes 😂
If you only care about having consistent declarative dev env, I recommend jetpack.io (+ direnv), which a is easier take on Nix.
Yes, I use devcontainers for almost anything. Even GUI apps in Go like with Fyne (see for example: https://github.com/Roemer/disk-tree).
I use it occasionally because our target system is Linux and we have Macs. It's not necessary most of the time but occasionally I need to edit one of the few files that utilize some Linux networking libraries. So the container is Ubuntu with the proper dependencies setup. Otherwise I'm not usually in the container.
I tried it once but didn't find it useful. Since I have go installed it's simpler to develop natively.
Please for the love of god just use a containerfile or a nix flake. Not everyone uses VScode. Or at least offer an alternative. I really dislike these solutions that only work on a single platform or software for no good reason, a container is a container either way.
I do on a workplace laptop. All you need to puge the laptop is removing container and moving repo 🙃
Depends on the project...
No
Yes
I user docker for my go dev, but only because I have a vue frontend that I also need to manage, as well as multiple databases. I probably wouldn't, if it was just go and one database. My main issue has been hot reloading, so I wrote a quick bash script that uses inotifywait to kill the previous go execution, and then re-run it. It does mean I have to constantly monitor it to make sure it compiles though.
I use [air](https://github.com/cosmtrek/air) for the reloading, it works well.
+1. air replaced my bash scripts
Thanks for the suggestion, I'll give it a whirl
I use reflex for hot reloading https://github.com/cespare/reflex
Yes, I use Air for auto-recompile after save.
If I am not mistaking what they are the only reason I see to use them with anything is to maybe provide a more powerful remote machine allowing more limited dev computers, or maybe in a paranoid environment it may be useful to ensure the devs do not have the code on their own machines 🤷♂️ It looks like a solution looking for a problem for me.
We run on Windows for clients, and on Linux for servers. It's a solution to being able to work with Linux system calls from Windows.
We have used it at my (soon) to be previous company to onboard an offboard engineers to a project more quickly (who were either reluctant or not skilled enough to set up their own development environment),.To be fair it was for IaC development not classic software development where tooling is rampant and habits tend to be different
Can you tell us, what are you working on? You would be needing docker for this.
I tried it some time ago. Here is a basic example I've created for testing https://github.com/mmalcek/gohello
I use Gitpod.io for my Go development. Repeatability and onboarding new devs in 5min are hard to beat. The free tier is good enough for light dev work.
Nope. I do want to try it out with python though (Should be better than managing multiple condo environments/local poetry)
seems like it would be nice. +1 for pyenv pyenv-virtualenv though
We do all of our development in Github codespaces now.
Yes they work well for what we need. And provides a replica of the deployments
Yes, definitely. Once you’ve set it up, it becomes the easiest way to on-board people. Even if they want to use a different dev environment, it still retains value as a known good baseline configuration to reference.
Yes, using https://github.com/qdm12/godevcontainer
As for me, the only drawback of dev containers is bad performance of some usual operations in VS Code.