devcontainer: simplify and remove Dockerfile

Signed-off-by: Sven Anderson <sven@redhat.com>
This commit is contained in:
Sven Anderson 2021-06-11 23:52:10 +02:00 committed by Sven Anderson
parent 4298c2bd0e
commit cc08cab257
2 changed files with 5 additions and 17 deletions

View File

@ -1,13 +0,0 @@
ARG CEPH_VERSION
FROM go-ceph-ci:${CEPH_VERSION}
RUN cd /tmp && \
go get -v \
golang.org/x/tools/gopls \
honnef.co/go/tools/... \
golang.org/x/lint/golint \
github.com/mgechev/revive \
github.com/uudashr/gopkgs/v2/cmd/gopkgs \
github.com/ramya-rao-a/go-outline \
github.com/go-delve/delve/cmd/dlv \
github.com/golangci/golangci-lint/cmd/golangci-lint

View File

@ -2,18 +2,18 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/docker-existing-dockerfile // https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/docker-existing-dockerfile
{ {
"name": "go-ceph", "name": "go-ceph",
"initializeCommand": "make CEPH_VERSION=octopus ci-image",
"build": { "build": {
// Sets the run context to one level up instead of the .devcontainer folder. // Sets the run context to one level up instead of the .devcontainer folder.
//"context": "..", "context": "..",
"dockerfile": "Dockerfile", "dockerfile": "../testing/containers/ceph/Dockerfile",
"args": { "args": {
"CEPH_VERSION": "octopus" "CEPH_VERSION": "octopus"
} }
}, },
"workspaceMount": "source=${localWorkspaceFolder},target=/go/src/github.com/ceph/go-ceph,type=bind,consistency=cached",
"workspaceFolder": "/go/src/github.com/ceph/go-ceph",
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": { "settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"go.toolsManagement.checkForUpdates": "local", "go.toolsManagement.checkForUpdates": "local",
"go.toolsManagement.autoUpdate": true, "go.toolsManagement.autoUpdate": true,
"go.useLanguageServer": true, "go.useLanguageServer": true,
@ -45,6 +45,7 @@
], ],
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker. // Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], // "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
"mounts": [ "source=test_ceph_go_cache,target=/go,type=volume" ],
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root. // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode" // "remoteUser": "vscode"
} }