Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

open a file in docker container with vscode

I need to edit a file in a docker container. as no advanced ide inside the container,I wonder if vscode or some other ide can access into the container and let me edit files as outside the container.

like image 746
curtank Avatar asked Nov 14 '18 03:11

curtank


2 Answers

With the May, 2nd 2019 announcement of "Remote Development with VS Code", you actually can use The Remote - Containers extension :

https://microsoft.github.io/vscode-remote-release/images/remote-containers-readme.gif

The Remote - Containers extension lets you use a Docker container as a full-featured development environment.

Containers make a great development environment because you can:

  • Develop with a consistent and easily reproducible toolchain and on the same operating system you are deploying to.
  • Quickly swap between different, isolated development environments and safely make updates without worrying about impacting your local machine.
  • Make it easy for new team members / contributors to get up and running in a consistent development environment.
like image 143
VonC Avatar answered Sep 30 '22 22:09

VonC


Docker Workspace makes enabled to add folder inside a running docker container.

enter image description here

like image 31
Arbaoui Mehdi Avatar answered Sep 30 '22 21:09

Arbaoui Mehdi