Live data from Hacker News

VSCode, Dev Containers and Docker

blog.feabhas.com

11–20 of 234 posts

Re: VSCode, Dev Containers and Docker

#11
post #9
post #4

...or you could use https://codeanywhere.com/ https://gitpod.io/ https://codesandbox.io/ https://codenvy.com/ for a more streamlined experience...

I don't know what could be more streamlined than clicking "Code -> Open in Codespace" on GitHub, and Visual Studio Code renders in your browser, with all of your dotfiles set and dependencies loaded to mess around with something. (GitPod does a similar thing where you can append the URL to gitpod.io, but they can't use the VSCode extension marketplace).

Codespaces is in private beta. I have requested access for some time now and got no response.

All the services I mentioned are fully open for everybody today.

Re: VSCode, Dev Containers and Docker

#12
post #7

I've been doing some playing around with dev containers for a while now and am loving the experience so far. The one thing I am not super clear on however is doing end to end browser based testing in Web Apps. I didn't find a lot of good documentation on this currently. I can't tell if the "correct" solution is to also load something like headless chrome into the Dockerfile and install it manually or go down the path…

A headless chrome works for testing. You can even open GUI apps (at least with X11 on Linux) from the container itself, and it will use the host's X session (chrome --no-sandbox).

I've been using a containerized Rails app with VSCode for a while now and absolutely love it.

Re: VSCode, Dev Containers and Docker

#13

I 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?

If you have projects with different versions (python2/3, Java5/8, node8/11 etc) you don't need to bother with version managers and package managers anymore.

Just launch the respective container and you are good to go.

Re: VSCode, Dev Containers and Docker

#16

I 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?

Consistency between team members.

Super easy for new team members to get started on a project. No need to manually install dependencies.

Environment versioning in git and docker. Your local environment gets automatically updated with a git pull.

Re: VSCode, Dev Containers and Docker

#17

I 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?

If you have projects with different versions (python2/3, Java5/8, node8/11 etc) you don't need to bother with version managers and package managers anymore. Just launch the respective container and you are good to go.

for python, why cant you use use virtualenv with pyenv?

Re: VSCode, Dev Containers and Docker

#19

I 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?

So, you can extend your bio-break waiting for your build to finish as Docker furiously crunches those files, raises your laptop temperature and makes those fans spin mightily.

Re: VSCode, Dev Containers and Docker

#20
post #8

Doing 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.

Agreed, try running webpack in debug mode with watch it's basically not-usable, as is git and install npm packages.
Post reply on HN