diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ebe7805c7bb5c3a48aa51f3528bfb4c26ace3de1..f2d00f11fdb4bfb0d637f7a9ca624e0f890883e8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,5 +2,10 @@ FROM ghcr.io/containerbase/node:18.16.0 USER root +RUN install-apt make g++ + +# renovate: datasource=github-releases packageName=containerbase/python-prebuild +RUN install-tool python 3.11.3 + # renovate: datasource=npm RUN install-tool yarn 1.22.19 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 306cb29b34a443476d2a34be45da167719bb9e54..ff52204e6e3a68cd86a4464f97cb9e68a810df5f 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,21 +1,28 @@ { + "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.schema.json", "hostRequirements": { "cpus": 4, - "memory": "8gb", + "memory": "7gb", "storage": "32gb" }, "name": "Renovate", "dockerFile": "Dockerfile", - "settings": { - "terminal.integrated.profiles.linux": { "bash": { "path": "/bin/bash" } }, - "terminal.integrated.defaultProfile.linux": "bash" + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.profiles.linux": { + "bash": { "path": "/bin/bash" } + }, + "terminal.integrated.defaultProfile.linux": "bash" + }, + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "orta.vscode-jest", + "EditorConfig.editorconfig" + ] + } }, - "extensions": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "orta.vscode-jest", - "EditorConfig.editorconfig" - ], "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml new file mode 100644 index 0000000000000000000000000000000000000000..094242aa40946f78139ee1daec2827ac9095a5dd --- /dev/null +++ b/.github/workflows/devcontainer.yml @@ -0,0 +1,17 @@ +name: devcontainer +on: + pull_request: + branches: + - main + +jobs: + devcontainer-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3.5.2 + + - name: Build and run dev container task + uses: devcontainers/ci@v0.3.1900000328 + with: + runCmd: yarn build diff --git a/docs/development/local-development.md b/docs/development/local-development.md index a141a9b3a537aa59bae671a8a06ac0d14bf3f99f..d1714fe95a8132527e846b49f6fde37c8f63e2c9 100644 --- a/docs/development/local-development.md +++ b/docs/development/local-development.md @@ -47,9 +47,9 @@ If you already installed a part, skip the corresponding step. PS C:\Windows\system32> yarn --version ``` -#### VS Code Remote Development +#### VS Code Dev Containers -If you are using [VS Code](https://code.visualstudio.com/) you can skip installing [the prerequisites](#prerequisites) and work in a [development container](https://code.visualstudio.com/docs/remote/containers) instead. +If you are using [VS Code](https://code.visualstudio.com/) you can skip installing [the prerequisites](#prerequisites) and work in a [development container](https://code.visualstudio.com/docs/devcontainers/containers) instead. - Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and [check its system requirements](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers#system-requirements) - Open the repository folder in VS Code @@ -57,6 +57,12 @@ If you are using [VS Code](https://code.visualstudio.com/) you can skip installi The VS Code [integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal) is now running in the container and can be used to run additional commands. +To build inside the container: + +```shell +yarn build +``` + #### Local Docker If, for some reason, you can't run the relevant versions on your local machine, you can run everything from a Docker image.