From 1bf65182cac0ffa22c5f297d05638b4b23c09566 Mon Sep 17 00:00:00 2001 From: Prati28 Date: Sat, 19 Oct 2024 23:37:36 +0530 Subject: [PATCH] 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