diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 4e4980b71d..0000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster -ARG VARIANT=16-bullseye -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} - -# [Optional] Uncomment this section to install additional OS packages. -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 \ - libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 \ - libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 \ - wget xdg-utils redis-server \ - && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* - -# [Optional] Uncomment if you want to install an additional version of node using nvm -# ARG EXTRA_NODE_VERSION=10 -# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" - -# [Optional] Uncomment if you want to install more global node modules -# RUN su node -c "npm install -g " diff --git a/.devcontainer/base.Dockerfile b/.devcontainer/base.Dockerfile deleted file mode 100644 index a0fee1021b..0000000000 --- a/.devcontainer/base.Dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster -ARG VARIANT=16-bullseye -FROM node:${VARIANT} - -# [Option] Install zsh -ARG INSTALL_ZSH="true" -# [Option] Upgrade OS packages to their latest versions -ARG UPGRADE_PACKAGES="true" - -# Install needed packages, yarn, nvm and setup non-root user. Use a separate RUN statement to add your own dependencies. -ARG USERNAME=node -ARG USER_UID=1000 -ARG USER_GID=$USER_UID -ARG NPM_GLOBAL=/usr/local/share/npm-global -ENV NVM_DIR=/usr/local/share/nvm -ENV NVM_SYMLINK_CURRENT=true \ - PATH=${NPM_GLOBAL}/bin:${NVM_DIR}/current/bin:${PATH} -COPY library-scripts/*.sh library-scripts/*.env /tmp/library-scripts/ -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - # Remove imagemagick due to https://security-tracker.debian.org/tracker/CVE-2019-10131 - && apt-get purge -y imagemagick imagemagick-6-common \ - # Install common packages, non-root user, update yarn and install nvm - && bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true" \ - # Install yarn, nvm - && rm -rf /opt/yarn-* /usr/local/bin/yarn /usr/local/bin/yarnpkg \ - && bash /tmp/library-scripts/node-debian.sh "${NVM_DIR}" "none" "${USERNAME}" \ - # Configure global npm install location, use group to adapt to UID/GID changes - && if ! cat /etc/group | grep -e "^npm:" > /dev/null 2>&1; then groupadd -r npm; fi \ - && usermod -a -G npm ${USERNAME} \ - && umask 0002 \ - && mkdir -p ${NPM_GLOBAL} \ - && touch /usr/local/etc/npmrc \ - && chown ${USERNAME}:npm ${NPM_GLOBAL} /usr/local/etc/npmrc \ - && chmod g+s ${NPM_GLOBAL} \ - && npm config -g set prefix ${NPM_GLOBAL} \ - && sudo -u ${USERNAME} npm config -g set prefix ${NPM_GLOBAL} \ - # Install eslint - && su ${USERNAME} -c "umask 0002 && npm install -g eslint" \ - && npm cache clean --force > /dev/null 2>&1 \ - # Install python-is-python3 on bullseye to prevent node-gyp regressions - && . /etc/os-release \ - && if [ "${VERSION_CODENAME}" = "bullseye" ]; then apt-get -y install --no-install-recommends python-is-python3; fi \ - # Clean up - && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /root/.gnupg /tmp/library-scripts - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - -# [Optional] Uncomment if you want to install an additional version of node using nvm -# ARG EXTRA_NODE_VERSION=10 -# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" - -# [Optional] Uncomment if you want to install more global node modules -# RUN su node -c "npm install -g "" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6914b2550d..7babd82dfa 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,8 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/javascript-node +// https://github.com/devcontainers/images/blob/v0.2.24/src/javascript-node/.devcontainer/devcontainer.json { "name": "Node.js", - "build": { - "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 18, 16, 14. - // Append -bullseye or -buster to pin to an OS version. - // Use -bullseye variants on local arm64/Apple Silicon. - "args": { "VARIANT": "16-bullseye" } - }, + "image": "mcr.microsoft.com/devcontainers/javascript-node:16-bullseye", // Configure tool-specific properties. "customizations": { @@ -34,23 +28,35 @@ "portsAttributes": { "1200": { "label": "app port", - "onAutoForward": "ignore" + "onAutoForward": "notify" }, "8080": { "label": "docs port", - "onAutoForward": "ignore" + "onAutoForward": "notify" } }, + "onCreateCommand": "apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get -y install --no-install-recommends ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 wget xdg-utils redis-server && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*", + + "updateContentCommand": "yarn", + // Use 'postCreateCommand' to run commands after the container is created. "postCreateCommand": "yarn", - // "postAttachCommand": "yarn dev", + // Disable auto start dev env since codespaces sometimes fails to attach to the terminal + // "postAttachCommand": { + // "app": "yarn", + // // "docs": "yarn docs:dev" + // }, // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. "remoteUser": "node", "features": { - "docker-in-docker": "latest", - "github-cli": "latest" + "ghcr.io/devcontainers/features/docker-in-docker": { + "version": "latest" + }, + "ghcr.io/devcontainers/features/github-cli": { + "version": "latest" + } } } diff --git a/.gitpod.yml b/.gitpod.yml index ddd20e58be..c33d24d2e9 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -18,9 +18,9 @@ tasks: - name: app command: yarn dev openMode: tab-after - - name: docs - command: yarn docs:dev - openMode: tab-after + # - name: docs + # command: yarn docs:dev + # openMode: tab-after vscode: extensions: