Earlier quoted context omitted.
To make it workable I had to just give up on the local host file integration. I basically used the container like a VM. Configured it with all the tools I normally use (e.g. OhMyZsh, etc) and had it constantly running in the background. I would use VS Code as a front end and work directly inside the container (cloning repos and pushing commits). It had its quirks but the main benefit was that my local machine was no…
What would be the advantage of this setup over a traditional VM where you presumably have more portability of the stateful image?
VSCode, Dev Containers and Docker
71–80 of 234 posts
Re: VSCode, Dev Containers and Docker
#72Earlier quoted context omitted.
Agreed, try running webpack in debug mode with watch it's basically not-usable, as is git and install npm packages.
npm / webpack: That's not Docker's fault - that's node/JS's fault. Having to touch thousands and thousands of files is expensive. This is why I've come to loath web frontend development.
Re: VSCode, Dev Containers and Docker
#73Slightly off-topic, it really irks me when people take about reproducible builds/environments while using docker, while having something along the lines of apt-get update/pip install in their dockerfile. Like that completely destroys the reproducibility of your container!
And by that you mean that the version of those deps aren't pinned?
Re: VSCode, Dev Containers and Docker
#74I understand this can be done. And this post explains how it's done. I still don't get why it should be done? What's the advantage of running your dev environment in a container?
It depends on what the environment is for. Your company work, or individual projects? If you're an individual, then it would benefit someone who has multiple devices and/or multiple operating systems and doesn't want to manage their environment across all those devices and operating systems. For example, I personally have OSX, Windows, and several different Linux distributions on my laptop itself. My desktop also run…
Re: VSCode, Dev Containers and Docker
#75Doing any sort of development with Docker on OSX can be painfully slow if you have a lot of files that change frequently. There are a few projects to improve it but they quite aren't there yet. It's my least favourite aspect of modern web work.
Re: VSCode, Dev Containers and Docker
#76Oh! My sides!
Re: VSCode, Dev Containers and Docker
#77Earlier quoted context omitted.
Agreed, try running webpack in debug mode with watch it's basically not-usable, as is git and install npm packages.
npm / webpack: That's not Docker's fault - that's node/JS's fault. Having to touch thousands and thousands of files is expensive. This is why I've come to loath web frontend development.
I work on linux, but try to onboard windows dev frequently ("windows dev", ikr ;) . The experience is always painful, and despite many efforts from the WSL team to move forward, docker for development on Windows is still barely usable right now ...
Re: VSCode, Dev Containers and Docker
#78Slightly off-topic, it really irks me when people take about reproducible builds/environments while using docker, while having something along the lines of apt-get update/pip install in their dockerfile. Like that completely destroys the reproducibility of your container!
I mean in a sense, the fucked up behavior of system package managers relative to the actual concerns of building and distributing software to the masses is the reason we need Docker to sandbox environments in the first place. It's 2021, there is next to no reason why the default behavior is installation to /usr/lib with shared objects that are rarely shared, with global access when installed for one application used…
Re: VSCode, Dev Containers and Docker
#79Slightly off-topic, it really irks me when people take about reproducible builds/environments while using docker, while having something along the lines of apt-get update/pip install in their dockerfile. Like that completely destroys the reproducibility of your container!
I never understood why commands like apt-get don't take a version with the dependency name.
Re: VSCode, Dev Containers and Docker
#80Earlier quoted context omitted.
You are confusing two different things. One is using Docker as a deployment packaging method. The other is using Docker only for development and still deploying traditionally. Sure you can do both, but it doesn't have to be this way. >when I use Docker, I pretend it's a VM Also check anti-patterns 1 and 4 here https://codefresh.io/containers/docker-anti-patterns/
Anti-pattern 1 perfectly describes how I am (hamfistedly) using Docker. Thanks! However, it doesn't really explain how to fix my mindset. It just says that I should ;-) Could you give me some hints?
Basically learn the basics (cgroups, namespaces)
You should also study this https://github.com/p8952/bocker