git.delta.rocks / unique-network / refs/commits / 922abe07f562

difftreelog

build update devcontainer for parachains

Yaroslav Bolyukin2021-07-27parent: #b783ce3.patch.diff
in: master

3 files changed

modified.devcontainer/Dockerfilediffbeforeafterboth
before · .devcontainer/Dockerfile
1FROM mcr.microsoft.com/vscode/devcontainers/rust:0-123RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \4    apt-get -y install --no-install-recommends libssl-dev pkg-config libclang-dev clang56RUN curl -L -o- https://github.com/WebAssembly/binaryen/releases/download/version_101/binaryen-version_101-x86_64-linux.tar.gz | \7    tar xz --strip-components=1 -C /usr89USER vscode1011RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash && \12    export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \13    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \14    nvm install v16.2.0 && \15    npm install -g yarn && \16    rustup toolchain install nightly-2021-05-30 && \17    rustup default nightly-2021-05-30 && \18    rustup target add wasm32-unknown-unknown && \19    rustup component add rustfmt clippy && \20    cargo install cargo-expand cargo-edit cargo-contract
after · .devcontainer/Dockerfile
1FROM mcr.microsoft.com/vscode/devcontainers/rust:0-123RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && \4    apt-get -y install --no-install-recommends libssl-dev pkg-config libclang-dev clang56RUN curl -L -o- https://github.com/WebAssembly/binaryen/releases/download/version_101/binaryen-version_101-x86_64-linux.tar.gz | \7    tar xz --strip-components=1 -C /usr89USER vscode1011RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash && \12    export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" && \13    [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \14    nvm install v16.2.0 && \15    npm install -g yarn && \16    rustup toolchain install nightly-2021-05-20 && \17    rustup default nightly-2021-05-20 && \18    rustup target add wasm32-unknown-unknown && \19    rustup component add rustfmt clippy && \20    cargo install cargo-expand cargo-edit cargo-contract
modified.devcontainer/devcontainer.jsondiffbeforeafterboth
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,9 +1,8 @@
 {
 	"name": "Rust",
-	"build": {
-		"dockerfile": "Dockerfile"
-	},
-	"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
+    "dockerComposeFile": "./docker-compose.yml",
+    "service": "nft_private",
+    "workspaceFolder": "/workspaces/nft_private",
 	"settings": { 
 		"terminal.integrated.shell.linux": "/bin/bash",
 		"lldb.executable": "/usr/bin/lldb",
@@ -13,7 +12,8 @@
 	},
 	"extensions": [
 		"matklad.rust-analyzer",
-		"dbaeumer.vscode-eslint"
+		"dbaeumer.vscode-eslint",
+		"tamasfe.even-better-toml"
 	],
 	"remoteUser": "vscode"
 }
added.devcontainer/docker-compose.ymldiffbeforeafterboth
--- /dev/null
+++ b/.devcontainer/docker-compose.yml
@@ -0,0 +1,23 @@
+version: '3'
+services:
+  nft_private:
+    build: 
+        context: .
+    environment:
+      - JAEGER_AGENT_HOST=jaeger
+      - JAEGER_AGENT_PORT=6831
+    volumes:
+      - ..:/workspaces/nft_private:cached
+      - ../../polkadot:/workspaces/polkadot:cached
+      - ../../polkadot-launch:/workspaces/polkadot-launch:cached
+      #- ../../frontier:/workspaces/frontier
+    cap_add:
+      - SYS_PTRACE
+    security_opt:
+      - seccomp:unconfined
+    command: /bin/sh -c "while sleep 1000; do :; done"
+  jaeger:
+    image: jaegertracing/all-in-one:latest
+    ports:
+      - "6831:6831/udp"
+      - "16686:16686"
\ No newline at end of file