diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 87e0aa4325..ff9d7c0bbc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "build": { "context": "..", "dockerfile": "../Dockerfile", - "target": "dev" + "target": "devcontainer" }, "workspaceFolder": "/go/src/github.com/docker/docker", "workspaceMount": "source=${localWorkspaceFolder},target=/go/src/github.com/docker/docker,type=bind,consistency=cached", diff --git a/Dockerfile b/Dockerfile index 6b4ff9e15d..0234218419 100644 --- a/Dockerfile +++ b/Dockerfile @@ -251,6 +251,12 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ GOBIN=/build/ GO111MODULE=on go install "mvdan.cc/sh/v3/cmd/shfmt@${SHFMT_VERSION}" \ && /build/shfmt --version +FROM base AS gopls +RUN --mount=type=cache,target=/root/.cache/go-build \ + --mount=type=cache,target=/go/pkg/mod \ + GOBIN=/build/ GO111MODULE=on go install "golang.org/x/tools/gopls@latest" \ + && /build/gopls version + FROM base AS dockercli WORKDIR /go/src/github.com/docker/cli ARG DOCKERCLI_REPOSITORY @@ -655,6 +661,11 @@ RUN < make shell # > SYSTEMD=true make shell