diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..2df2e3e81 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm + +# Install pre-reqs for gyp, and 'canvas' npm module +RUN apt-get update && \ + apt-get install -y \ + make \ + gcc \ + g++ \ + python3-minimal \ + libcairo2-dev \ + libpango1.0-dev \ + && \ + rm -rf /var/lib/apt/lists/* + +# Install node-gyp to build native modules +RUN npm install -g node-gyp \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..b6d399f2c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,32 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node +{ + "name": "Azure Cosmos DB Explorer", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "build": { + "dockerfile": "Dockerfile" + }, + "onCreateCommand": ".devcontainer/oncreate", + "features": { + "ghcr.io/devcontainers/features/azure-cli:1": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/github-cli:1": { + "installDirectlyFromGitHubRelease": true, + "version": "latest" + }, + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + } + } + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "yarn install", + // Configure tool-specific properties. + // "customizations": {}, + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file diff --git a/.devcontainer/oncreate b/.devcontainer/oncreate new file mode 100755 index 000000000..6ce3fba21 --- /dev/null +++ b/.devcontainer/oncreate @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Install packages once, to prime the node_modules directory. +npm ci \ No newline at end of file