1bdd9587ff | ||
---|---|---|
.. | ||
.devcontainer | ||
.npmignore | ||
README.md |
README.md
Existing Dockerfile
Summary
Sample illustrating reuse of an existing Dockefile.
Metadata | Value |
---|---|
Contributors | The VS Code team |
Categories | Core, Other |
Definition type | Dockerfile |
Container host OS support | Linux, macOS, Windows |
Languages, platforms | Any |
Note: There is also a Docker Compose variation of this same definition.
Using this definition
This definition requires an existing Dockerfile
in your project and outlines some settings in .devcontainer/devcontainer.json
to consider when reusing one.
Follow these steps to use it:
-
If this is your first time using a development container, please follow the getting started steps to set up your machine.
-
To use VS Code's copy of this definition:
- Start VS Code and open your project folder.
- Press F1 select and Remote-Containers: Add Development Container Configuration Files... from the command palette.
- Select the Existing Dockerfile definition.
-
To use latest-and-greatest copy of this definition from the repository:
- Clone this repository.
- Copy the contents of
containers/docker-existing-dockerfile/.devcontainer
to the root of your project folder. - Start VS Code and open your project folder.
-
After following step 2 or 3, review the settings and comments in the
.devcontainer/devcontainer.json
file added to your project. Comments in the file will help you expose new ports, install extensions, forward the Docker socket, and more. -
Finally, press F1 and run Remote-Containers: Reopen Folder in Container to start using the definition.
License
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See LICENSE.