
When using palette commands or context menus in the explorer, the Docker extension executes commands on your behalf. You can now use the debugger to set breakpoints and step through your code.ĭiagram 3: Debug configuration for Python (Flask) in a Docker container Docker Command Customization An image will be built using the Dockerfile, a container will be started using this image, and then your app will be started inside the container with the debugger attached. On the Debugger panel, choose a Docker configuration and start debugging. This makes debugging your app inside a container just a couple clicks away. When using the command “Docker: Add Docker Files to Workspace”, the extension places configurations in the tasks.json and launch.json files. NET Core we support integrated debugging of a single service using a Dockerfile. The Docker extension now supports using either a Compose.yml file or only a Dockerfile. That said, if you just need to start a single container with few parameters, using just a Dockerfile might work fine. Don’t worry, we still support a “General” option as well if you want a more generic Dockerfile.ĭiagram 2: Scaffolding a Python Flask Dockerfile Docker Compose or DockerfileĬompose is great when you want to start more than one service at a time, or even a single service if you need specify Docker ‘run’ parameters like port mappings, environment variables, volume mappings, and more. Based on your response we’ll scaffold the appropriate Dockerfile, debugging tasks, and launch configurations. Now, when you add Docker files to your workspace, you can select Django or Flask. We heard from many of our Python developers that the extension could do a better job scaffolding the initial Dockerfile, especially when using Django or Flask. There are several new features in the 1.0 version of the extension, the following focuses on a few of them. There are several features that will make your Docker container development experience easier and more efficient when scaffolding, running, debugging, and troubleshooting your containerized apps in Visual Studio Code.

#Microsoft visual studio code 1 install
Install the extension, or if you already have it installed then it should update automatically.

NET Core developers with the same support for Compose that Node.js developers already have. This version of the extension gives Python developers an integrated debugging experience as well as specific support for Django and Flask apps. The extension helps scaffold needed files, build Docker images, debug your app inside a container, and an explorer that makes it easy to take actions on containers and images such as start, stop, inspect, remove, and more. The Docker extension makes it easier to build apps that leverage Docker containers.

We recently released the 1.0 version of our Visual Studio Code Docker extension, which is the first general availability (GA) release.
