From 1bf65182cac0ffa22c5f297d05638b4b23c09566 Mon Sep 17 00:00:00 2001 From: Prati28 Date: Sat, 19 Oct 2024 23:37:36 +0530 Subject: [PATCH 1/3] added dev container Signed-off-by: Prati28 --- .devcontainer/Dockerfile | 18 ++++++++++++++++++ .devcontainer/devcontainer.json | 21 +++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..58405eff6 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,18 @@ +FROM mcr.microsoft.com/vscode/devcontainers/python:3.8 + +RUN apt-get update && apt-get install -y \ + git \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /workspace + +COPY . . + +RUN pip install -r docs/pip-requirements.txt + +ENV MKDOCS_PORT=8000 + +EXPOSE ${MKDOCS_PORT} + +CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"] \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..3542fd79b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,21 @@ +{ + "name": "Caliper Development", + "context": "..", + "dockerFile": "Dockerfile", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/bin/bash", + "python.defaultInterpreterPath": "/usr/local/bin/python" + }, + "extensions": [ + "ms-python.python", + "esbenp.prettier-vscode", + "ms-azuretools.vscode-docker" + ] + } + }, + "postCreateCommand": "cd docs && pip install -r pip-requirements.txt && mkdocs build", + "remoteUser": "vscode", + "forwardPorts": [8000] +} \ No newline at end of file From e648cf798bfe02dc235d08daa39a3ec94a00b532 Mon Sep 17 00:00:00 2001 From: Prati28 Date: Sun, 20 Oct 2024 11:05:48 +0530 Subject: [PATCH 2/3] added node support Signed-off-by: Prati28 --- .devcontainer/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 58405eff6..f4669b50a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,10 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:3.8 RUN apt-get update && apt-get install -y \ + curl \ git \ + && curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - \ + && apt-get install -y nodejs \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* From 8b5c4c9d5ef87e05dc848643400b46aac89cc686 Mon Sep 17 00:00:00 2001 From: Prati28 Date: Tue, 12 Nov 2024 20:56:11 +0530 Subject: [PATCH 3/3] did the changes Signed-off-by: Prati28 --- .devcontainer/Dockerfile | 21 --------------------- .devcontainer/devcontainer.json | 11 +++++++---- 2 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index f4669b50a..000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM mcr.microsoft.com/vscode/devcontainers/python:3.8 - -RUN apt-get update && apt-get install -y \ - curl \ - git \ - && curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - \ - && apt-get install -y nodejs \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /workspace - -COPY . . - -RUN pip install -r docs/pip-requirements.txt - -ENV MKDOCS_PORT=8000 - -EXPOSE ${MKDOCS_PORT} - -CMD ["mkdocs", "serve", "-a", "0.0.0.0:8000"] \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3542fd79b..d22db4af8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,12 @@ { "name": "Caliper Development", - "context": "..", - "dockerFile": "Dockerfile", + "image": "mcr.microsoft.com/vscode/devcontainers/python:3.11", + "features": { + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, + "ghcr.io/devcontainers/features/node:1": { + "version": "lts" + } + }, "customizations": { "vscode": { "settings": { @@ -9,9 +14,7 @@ "python.defaultInterpreterPath": "/usr/local/bin/python" }, "extensions": [ - "ms-python.python", "esbenp.prettier-vscode", - "ms-azuretools.vscode-docker" ] } },