4 ms·
I program this way also. My preferred method is simply to download the VSCode Remote Extension Pack: https://marketplace.visualstudio.com/items?itemName=ms-vsc
by 0xcoffee 6y ago
I program this way also.
My preferred method is simply to download the VSCode Remote Extension Pack: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack https://marketplace.visualstudio.com/items?itemName=ms-vscod...
Then in a project, simply `ctrl+shift+p` -> Add container configuration files. Then `ctrl+shift+p` -> Rebuild Container
Couldn't be easier.
The only downsides are lack of GUI, often in python it's nice to just do e.g. plot.show() rather then export to a file and view that file. But for most of my non-visual programming work, a docker is amazing. Once it works for me, I can guarantee it will work for all other developers, and more importantly, my dev environment is really similar to my prod environment.
- fluffything 6y agoYou can run a, e.g., jupyter notebook inside the container, and connect to it with your web-browser.
- screye 6y agoYep, that's how I develop. Remote machine + port forwarding + jupyter notebooks / python files. The productionizing happens on my local VScode, which is a lot more "decked out".
- chrisweekly 6y agoAny chance you have devnotes / gists / blog post to share more dets abt your setup?
- mbauman 6y agoI've found https://github.com/novnc/noVNC https://github.com/novnc/noVNC useful when I want to run something with a GUI in a container. Spin it up, forward the port, connect via browser.
- lioeters 6y agoI've started doing this recently, using VS Code's Remote SSH to develop projects in a virtual machine (or actually remote). It's so comfortable now, with the advantages of containers I can spin up and destroy, ensuring consistent environments. For lack of GUI, I first tried VNC and X Window client/server, but a bit awkward. As a sibling comment mentioned, I find it simpler to put together and serve a "web frontend" from the container.
- alfiedotwtf 6y ago> ensuring consistent environments This. I really don’t understand why all the hate with working in containers. If you can bring up and tear down quickly, it’s almost free like branching in git. It’s consistency by design!
- deleted 6y ago[deleted]
- zarkov99 6y agoI do think this is the future of development and all IDEs will need to support this use case very well. BTW, non reason to not have a GUI just start docker with: -v /tmp:/tmp -e DISPLAY=$DISPLAY And you should be able to launch X applications inside docker just fine. I run graphical emacs inside docker everyday.
- madduci 6y agoYou can use xvfb And use your Xauth in the container (assuming your host is Linux)