Dockerfile
and docker-compose.yml
files in your workspace. Visual Studio Code even supports generating and adding the appropriate Docker files based on your project type.docker
to filter the results. Select the Microsoft Docker extension.Dockerfile
. A Dockerfile is just a text file that contains the build instructions.Dockerfile
Dockerfile
commands. Pressing the 'i' Read More button on the right will show a fly-out with details and a link to the Docker Online documentation.COPY
snippet you can fill in the source
and then press Tab to move to the dest
field.Dockerfile
, Visual Studio Code will provide you with a description of any Docker command you hover over with the mouse. For example, when hovering over WORKDIR
you will see the following.docker-compose.yml
.docker-compose.yml
is also very rich, providing IntelliSense for valid Docker compose directives and it will query Docker Hub for metadata on public Docker images.docker-compose.yml
web:
image
directive, you can press ⌃Space (Windows, Linux Ctrl+Space) again and VS Code will query the Docker Hub index for public images.Microsoft
will show you all the public Microsoft images.Dockerfile
, docker-compose.yml
, and docker-compose.debug.yml
files for your workspace type:docker.defaultRegistry
), the shell to use when attaching to a Docker container (docker.attachShellCommand
), or various docker-compose settings.docker.languageserver.diagnostics
settingsdocker-machine
DOCKER_HOST
environment variable set to a valid host.sudo
. This extension does not assume root access, so you will need to create a Unix group called 'docker' and add users to it. Instructions can be found here: Create a Docker group.