diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000..3f1188972a --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,8 @@ +ARG VARIANT=24-bookworm +FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT} + +ARG PNPM_VERSION=11.5.0 + +# Configure Corepack-managed pnpm globally at image build time. +RUN corepack enable \ + && corepack prepare pnpm@${PNPM_VERSION} --activate diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..143d0964f7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,44 @@ +//devcontainer.json +{ + "name": "alfresco-ng2-components", + + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "build": { + "dockerfile": "Dockerfile", + "context": "..", + "args": { + "VARIANT": "24-bookworm", + "PNPM_VERSION": "11.5.0" + } + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + "remoteUser": "node", + "updateRemoteUserUID": true, + "overrideCommand": true, + "init": true, + + "customizations": { + "vscode": { + "settings": {}, + "extensions": ["streetsidesoftware.code-spell-checker"] + } + }, + + "containerEnv": { + "CI": "true", + "NODE_ENV": "development", + "NPM_CONFIG_AUDIT": "true", + "NPM_CONFIG_FUND": "false", + "NO_UPDATE_NOTIFIER": "1", + "PNPM_STORE_DIR": "/home/node/.pnpm-store" + }, + + "mounts": ["source=alfresco-ng2-pnpm-store,target=/home/node/.pnpm-store,type=volume"], + + "postCreateCommand": "pnpm install --frozen-lockfile", + + "runArgs": ["--cap-drop=ALL", "--security-opt=no-new-privileges:true", "--pids-limit=512"] +} diff --git a/.gitignore b/.gitignore index 3855bc25d8..262372c237 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.log node_modules +.pnpm-store/ bundles .idea/ *.iml