Преглед на файлове

Merge pull request #46930 from rumpl/devcontainer

Add devcontainer configuration
Sebastiaan van Stijn преди 1 година
родител
ревизия
f58f02f3e6
променени са 2 файла, в които са добавени 15 реда и са изтрити 0 реда
  1. 13 0
      .devcontainer/devcontainer.json
  2. 2 0
      docs/contributing/set-up-dev-env.md

+ 13 - 0
.devcontainer/devcontainer.json

@@ -0,0 +1,13 @@
+{
+  "name": "moby",
+  "build": {
+    "context": "..",
+    "dockerfile": "../Dockerfile",
+    "target": "dev"
+  },
+  "workspaceFolder": "/go/src/github.com/docker/docker",
+  "workspaceMount": "source=${localWorkspaceFolder},target=/go/src/github.com/docker/docker,type=bind,consistency=cached",
+
+  "remoteUser": "root",
+  "runArgs": ["--privileged"]
+}

+ 2 - 0
docs/contributing/set-up-dev-env.md

@@ -136,6 +136,8 @@ can take over 15 minutes to complete.
 
 
    At this point, your prompt reflects the container's BASH shell.
    At this point, your prompt reflects the container's BASH shell.
 
 
+   Alternatively you can use the provided devcontainer in an IDE that supports them (VSCode, Goland, etc.)
+
 5. List the contents of the current directory (`/go/src/github.com/docker/docker`).
 5. List the contents of the current directory (`/go/src/github.com/docker/docker`).
 
 
    You should see the image's source from the  `/go/src/github.com/docker/docker`
    You should see the image's source from the  `/go/src/github.com/docker/docker`