DEV Community

Discussion on: Hands-On with VSCode & "Dev Containers"

Collapse
 
axiol profile image
Arnaud Delante

I'd be curious to see if this is really more usefull than just using a full Docker configuration with a shared volume inside of it. I mean, don't get me wrong, this is a pretty amazing extension here, but when working in a team, everyone has to use VSCode. Where with just a plain Docker configuration, you don't care about the editor

Collapse
 
mcastellin profile image
Manuel Castellin

It'll be nice to see how I can use it with an existing project with more developers using different IDEs. I'll post additional thoughts when I have the chance to try it 👍

Collapse
 
mcastellin profile image
Manuel Castellin

I totally agree with you. One big advantage I can see with VSCode is how it handles projects with lots of files.

You probably know that Docker for Mac or Windows have huge issues with shared volumes performance and it's always been a massive problem when you work with large repos. It seems dev containers use rsync without mounting the host directory into the container.

I think it's interesting that you can also use any Dockerfile you already have in your project, and use the devcontainer.json to customize the dev container build with:

  • additional build args
  • post-start and post-attach commands

If you then use a docker-compose file, you don't need to change it but use an extension file like described here.

Collapse
 
axiol profile image
Arnaud Delante

But yes, otherwise, for a POC or personnal project, I most definitely can imagine myself using it

Collapse
 
axiol profile image
Arnaud Delante

Docker for Mac or Windows indeed have speed issues with file sharing. But, since the last Windows update and the integration on Docker in WSL2, thoses issues are gone. Stays the problem for Mac, but if I remember correctly, volume sharing on Mac was not as bad as Windows used to be, was it?

Thread Thread
 
mcastellin profile image
Manuel Castellin

I guarantee it is still pretty bad.. the write performance is still 60 times slower than your normal hard drive 😭 that makes it impossible to run an Ant build where every single Java file is touched

Collapse
 
cavo789 profile image
Christophe Avonture

Hello.
I've started today to play with a .devcontainer/devcontainer.json file and the first really interesting advantage I see is to be able to specify the list of extensions the container should have.
By saying extension I mean vscode extension : we can ensure that every member of the team will have the same extensions and the same settings.
That's a big advantage to me.