2021-04-26 18:21:49 +00:00
|
|
|
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
|
|
|
// https://github.com/microsoft/vscode-dev-containers/tree/v0.166.1/containers/docker-existing-dockerfile
|
|
|
|
{
|
|
|
|
"name": "go-ceph",
|
|
|
|
"build": {
|
|
|
|
// Sets the run context to one level up instead of the .devcontainer folder.
|
2021-06-11 21:52:10 +00:00
|
|
|
"context": "..",
|
|
|
|
"dockerfile": "../testing/containers/ceph/Dockerfile",
|
2021-04-26 18:21:49 +00:00
|
|
|
"args": {
|
|
|
|
"CEPH_VERSION": "octopus"
|
|
|
|
}
|
|
|
|
},
|
2021-06-11 21:52:10 +00:00
|
|
|
"workspaceMount": "source=${localWorkspaceFolder},target=/go/src/github.com/ceph/go-ceph,type=bind,consistency=cached",
|
|
|
|
"workspaceFolder": "/go/src/github.com/ceph/go-ceph",
|
2021-04-26 18:21:49 +00:00
|
|
|
// Set *default* container specific settings.json values on container create.
|
|
|
|
"settings": {
|
|
|
|
"go.toolsManagement.checkForUpdates": "local",
|
|
|
|
"go.toolsManagement.autoUpdate": true,
|
|
|
|
"go.useLanguageServer": true,
|
|
|
|
"go.goroot": "/opt/go",
|
|
|
|
"go.testEnvVars": {
|
2021-07-02 16:32:14 +00:00
|
|
|
"GODEBUG": "cgocheck=2",
|
|
|
|
"CEPH_CONF": "/ceph_a/ceph.conf",
|
2021-04-26 18:21:49 +00:00
|
|
|
},
|
2022-04-26 22:22:02 +00:00
|
|
|
"go.buildTags": "",
|
|
|
|
"go.testTags": "",
|
2021-04-26 18:21:49 +00:00
|
|
|
"go.testFlags": [
|
|
|
|
"-v",
|
|
|
|
"-count=1"
|
|
|
|
],
|
|
|
|
},
|
|
|
|
// Add the IDs of extensions you want installed when the container is created.
|
|
|
|
"extensions": [
|
|
|
|
"golang.go",
|
|
|
|
],
|
|
|
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
|
|
|
// "forwardPorts": [],
|
|
|
|
// Uncomment the next line to run commands after the container is created - for example installing curl.
|
|
|
|
// "postCreateCommand": "apt-get update && apt-get install -y curl",
|
|
|
|
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
|
|
|
|
"runArgs": [
|
|
|
|
"--cap-add=SYS_PTRACE",
|
2021-07-02 16:32:14 +00:00
|
|
|
"--security-opt=seccomp=unconfined",
|
|
|
|
"--net=test_ceph_net",
|
2021-04-26 18:21:49 +00:00
|
|
|
],
|
|
|
|
// 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" ],
|
2021-07-02 16:32:14 +00:00
|
|
|
"mounts": [
|
|
|
|
"source=test_ceph_go_cache,target=/go,type=volume",
|
|
|
|
"source=test_ceph_a_data,target=/ceph_a,type=volume",
|
|
|
|
"source=test_ceph_b_data,target=/ceph_b,type=volume",
|
|
|
|
],
|
|
|
|
|
|
|
|
// Uncomment to enable testing ceph nodes
|
|
|
|
// "initializeCommand": [
|
|
|
|
// "bash", "-c", "eval $*", "--",
|
|
|
|
// "docker kill test_ceph_a test_ceph_b 2>/dev/null ;",
|
|
|
|
// "docker run --rm -d --name test_ceph_a --hostname test_ceph_a",
|
|
|
|
// " --net test_ceph_net -v test_ceph_a_data:/tmp/ceph go-ceph-ci:octopus --test-run=NONE --pause ;",
|
|
|
|
// "docker run --rm -d --name test_ceph_b --hostname test_ceph_b",
|
|
|
|
// " --net test_ceph_net -v test_ceph_b_data:/tmp/ceph go-ceph-ci:octopus --test-run=NONE --pause ;",
|
|
|
|
// ],
|
|
|
|
// "postCreateCommand": "/entrypoint.sh --wait-for=/ceph_a/.ready:/ceph_b/.ready --ceph-conf=/ceph_a/ceph.conf --mirror=/ceph_b/ceph.conf --test-pkg none"
|
|
|
|
|
2021-04-26 18:21:49 +00:00
|
|
|
// Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
|
|
|
|
// "remoteUser": "vscode"
|
|
|
|
}
|