├── scripts ├── post-checkout ├── ccache.sh ├── build.sh ├── ncu.sh ├── setup-origin.sh ├── install-node.sh ├── clone.sh └── install.sh ├── TODO.md ├── .github └── workflows │ ├── docker-build-and-publish-linux-amd64.yml │ ├── docker-build-and-publish-linux-arm64.yml │ ├── docker-build.yml │ └── docker-merge.yml ├── LICENSE ├── Dockerfile ├── .gitignore ├── README.md └── CODE_OF_CONDUCT.md /scripts/post-checkout: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | git-restore-mtime 3 | -------------------------------------------------------------------------------- /scripts/ccache.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | # create symlinks 6 | /usr/sbin/update-ccache-symlinks 7 | -------------------------------------------------------------------------------- /scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | /home/developer/nodejs/node/configure --ninja && make -C /home/developer/nodejs/node 6 | -------------------------------------------------------------------------------- /scripts/ncu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | npm install -g @node-core/utils 6 | 7 | ncu-config set upstream upstream 8 | ncu-config set branch main 9 | -------------------------------------------------------------------------------- /scripts/setup-origin.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | if [[ -z "${ORIGIN_URL}" ]] 6 | then 7 | echo "ORIGIN_URL is not set" 8 | else 9 | git remote set-url origin ${ORIGIN_URL} 10 | fi 11 | -------------------------------------------------------------------------------- /scripts/install-node.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | make install PREFIX=/home/developer/.local -C /home/developer/nodejs/node 6 | echo '' >> /home/developer/.bashrc 7 | echo 'export PATH=/home/developer/.local/bin:$PATH' >> /home/developer/.bashrc 8 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | - [x] Switch to `node:latest` 2 | - [x] Install `node-core-utils` 3 | - [x] Documentation 4 | - [ ] Split into multiple stages https://github.com/nodejs/devcontainer/pull/12#discussion_r2375074158 5 | - [ ] Reuse Dockerfile bits from https://github.com/nodejs/build/blob/main/ansible/roles/docker/templates 6 | -------------------------------------------------------------------------------- /scripts/clone.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | mkdir -p /home/developer/nodejs 6 | cd /home/developer/nodejs 7 | git clone https://github.com/nodejs/node.git --single-branch --branch main --depth 1 8 | cd /home/developer/nodejs/node 9 | git remote add upstream https://github.com/nodejs/node.git 10 | git restore-mtime # Restore file modification times to commit times for build cache to match. 11 | -------------------------------------------------------------------------------- /.github/workflows/docker-build-and-publish-linux-amd64.yml: -------------------------------------------------------------------------------- 1 | name: Build and Publish Linux AMD64 Image 2 | 3 | on: 4 | workflow_dispatch: # allows us to trigger runs manually in the GitHub UI 5 | workflow_call: # allows this workflow to be called by another workflow 6 | 7 | jobs: 8 | docker: 9 | runs-on: ubuntu-24.04 10 | steps: # See https://docs.docker.com/build/ci/github-actions/multi-platform/ 11 | - name: Login to DockerHub 12 | uses: docker/login-action@v3 13 | with: # these are defined in the GitHub Secrets UI 14 | username: ${{ secrets.DOCKERHUB_USERNAME }} 15 | password: ${{ secrets.DOCKERHUB_TOKEN }} 16 | 17 | - name: Set up Docker Buildx 18 | uses: docker/setup-buildx-action@v3 19 | 20 | - name: Build and push 21 | uses: docker/build-push-action@v6 22 | with: 23 | platforms: linux/amd64 24 | push: true 25 | tags: ${{ vars.DOCKERHUB_IMAGE }}:nightly-linux-amd64 26 | -------------------------------------------------------------------------------- /.github/workflows/docker-build-and-publish-linux-arm64.yml: -------------------------------------------------------------------------------- 1 | name: Build and Publish Linux ARM64 Image 2 | 3 | on: 4 | workflow_dispatch: # allows us to trigger runs manually in the GitHub UI 5 | workflow_call: # allows this workflow to be called by another workflow 6 | 7 | jobs: 8 | docker: 9 | runs-on: ubuntu-24.04-arm 10 | steps: # See https://docs.docker.com/build/ci/github-actions/multi-platform/ 11 | - name: Login to DockerHub 12 | uses: docker/login-action@v3 13 | with: # these are defined in the GitHub Secrets UI 14 | username: ${{ secrets.DOCKERHUB_USERNAME }} 15 | password: ${{ secrets.DOCKERHUB_TOKEN }} 16 | 17 | - name: Set up Docker Buildx 18 | uses: docker/setup-buildx-action@v3 19 | 20 | - name: Build and push 21 | uses: docker/build-push-action@v6 22 | with: 23 | platforms: linux/arm64 24 | push: true 25 | tags: ${{ vars.DOCKERHUB_IMAGE }}:nightly-linux-arm64 26 | -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e # Exit with nonzero exit code if anything fails 4 | 5 | package_list=" 6 | build-essential \ 7 | ccache \ 8 | curl \ 9 | nano \ 10 | python3 \ 11 | python3-pip \ 12 | python-is-python3 \ 13 | ninja-build \ 14 | g++ \ 15 | gcc \ 16 | g++-12 \ 17 | gcc-12 \ 18 | make \ 19 | git \ 20 | pkg-config \ 21 | locales \ 22 | gpg \ 23 | wget \ 24 | git-restore-mtime" 25 | 26 | # Install Packages 27 | apt-get update 28 | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $package_list 29 | 30 | # set up GitHub CLI resistry stuff to get gh CLI 31 | curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg 32 | echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null 33 | gh_package_list="gh" 34 | apt-get update 35 | DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends $gh_package_list 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License Copyright (c) 2021 Tierney Cyren 2 | 3 | Permission is hereby granted, free 4 | of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, copy, modify, merge, 7 | publish, distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to the 9 | following conditions: 10 | 11 | The above copyright notice and this permission notice 12 | (including the next paragraph) shall be included in all copies or substantial 13 | portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 18 | EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:latest AS build 2 | 3 | ARG USER_UID=900 4 | ARG USER_GID=$USER_UID 5 | 6 | # Create the non-root user and grant NOPASSWD sudo 7 | RUN groupadd --gid $USER_GID developer 8 | RUN useradd --uid $USER_UID --gid $USER_GID --shell /bin/bash --create-home developer 9 | 10 | # Install sudo first 11 | RUN apt-get update 12 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sudo 13 | 14 | # No Sudo Prompt - thanks Electron for this 15 | RUN echo 'developer ALL=NOPASSWD: ALL' >> /etc/sudoers.d/developer 16 | RUN echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep 17 | 18 | ENV DEBIAN_FRONTEND=1 19 | ENV PATH=/usr/lib/ccache:$PATH 20 | 21 | # Copy scripts and make them executable by both root and developer 22 | COPY --chown=root:developer --chmod=0755 ./scripts/ /home/developer/scripts/ 23 | RUN /home/developer/scripts/install.sh 24 | RUN /home/developer/scripts/ccache.sh 25 | 26 | USER developer 27 | RUN /home/developer/scripts/clone.sh 28 | RUN /home/developer/scripts/build.sh 29 | 30 | ENV PATH=/home/developer/.local/bin:$PATH 31 | WORKDIR /home/developer/nodejs/node 32 | RUN /home/developer/scripts/install-node.sh 33 | RUN /home/developer/scripts/ncu.sh 34 | -------------------------------------------------------------------------------- /.github/workflows/docker-build.yml: -------------------------------------------------------------------------------- 1 | name: Nightly Build Orchestrator 2 | 3 | on: 4 | workflow_dispatch: # allows us to trigger runs manually in the GitHub UI 5 | repository_dispatch: # allows us to trigger runs from an external repository 6 | schedule: 7 | - cron: '0 0 * * *' # runs nightly 8 | 9 | # When any of the build workflows complete successfully on the nightly branch, 10 | # the merge workflow will be triggered by those workflows directly to update 11 | # the build for that platform. These are run independently and concurrently, 12 | # if any of them fail, at worst the image for that specific platform won't be 13 | # updated, but at least one usable image for a platform is always available, 14 | # which is better than dragging the updates for all platforms to wait 15 | # for one platform to be fixed. 16 | jobs: 17 | call_build_arm64: 18 | if: ${{ github.ref == format('refs/heads/{0}', vars.NIGHTLY_BRANCH) }} 19 | uses: ./.github/workflows/docker-build-and-publish-linux-arm64.yml 20 | secrets: inherit 21 | 22 | call_build_amd64: 23 | if: ${{ github.ref == format('refs/heads/{0}', vars.NIGHTLY_BRANCH) }} 24 | uses: ./.github/workflows/docker-build-and-publish-linux-amd64.yml 25 | secrets: inherit 26 | -------------------------------------------------------------------------------- /.github/workflows/docker-merge.yml: -------------------------------------------------------------------------------- 1 | name: Merge images 2 | 3 | on: 4 | workflow_run: # Fires when any of the specified workflows complete 5 | workflows: ["Build and Publish Linux ARM64 Image", "Build and Publish Linux AMD64 Image"] 6 | types: [completed] 7 | 8 | env: 9 | IMAGE: ${{ vars.DOCKERHUB_IMAGE }} 10 | REGISTRY: docker.io 11 | 12 | concurrency: # ensure only one merge runs at a time 13 | group: merge-manifest 14 | cancel-in-progress: false 15 | 16 | jobs: 17 | merge: 18 | if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == vars.NIGHTLY_BRANCH }} 19 | runs-on: ubuntu-latest 20 | steps: 21 | - name: Login to DockerHub 22 | uses: docker/login-action@v3 23 | with: # these are defined in the GitHub Secrets UI 24 | username: ${{ secrets.DOCKERHUB_USERNAME }} 25 | password: ${{ secrets.DOCKERHUB_TOKEN }} 26 | 27 | - name: Set up Docker Buildx 28 | uses: docker/setup-buildx-action@v3 29 | 30 | # Merge the multiple architecture-specific images into a single multi-arch image. 31 | # If images for other architectures do not exist in the registry yet, this step will fail. 32 | # It will only succeed when at least one image for each architecture has been built and pushed. 33 | # If images for other architectures are being built and the ones in the registry 34 | # are old, it only updates the nightly tag for the architecture that triggered this 35 | # workflow. When images for other architectures are built successfully later, they will 36 | # trigger this workflow again and merge the updated images. 37 | - name: Create multi-arch manifest 38 | run: | 39 | docker buildx imagetools create \ 40 | -t ${REGISTRY}/${IMAGE}:nightly \ 41 | ${REGISTRY}/${IMAGE}:nightly-linux-amd64 \ 42 | ${REGISTRY}/${IMAGE}:nightly-linux-arm64 43 | 44 | - name: Verify multi-arch manifest 45 | run: | 46 | docker buildx imagetools inspect ${REGISTRY}/${IMAGE}:nightly 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Microbundle cache 58 | .rpt2_cache/ 59 | .rts2_cache_cjs/ 60 | .rts2_cache_es/ 61 | .rts2_cache_umd/ 62 | 63 | # Optional REPL history 64 | .node_repl_history 65 | 66 | # Output of 'npm pack' 67 | *.tgz 68 | 69 | # Yarn Integrity file 70 | .yarn-integrity 71 | 72 | # dotenv environment variables file 73 | .env 74 | .env.test 75 | .env.production 76 | 77 | # parcel-bundler cache (https://parceljs.org/) 78 | .cache 79 | .parcel-cache 80 | 81 | # Next.js build output 82 | .next 83 | out 84 | 85 | # Nuxt.js build / generate output 86 | .nuxt 87 | dist 88 | 89 | # Gatsby files 90 | .cache/ 91 | # Comment in the public line in if your project uses Gatsby and not Next.js 92 | # https://nextjs.org/blog/next-9-1#public-directory-support 93 | # public 94 | 95 | # vuepress build output 96 | .vuepress/dist 97 | 98 | # Serverless directories 99 | .serverless/ 100 | 101 | # FuseBox cache 102 | .fusebox/ 103 | 104 | # DynamoDB Local files 105 | .dynamodb/ 106 | 107 | # TernJS port file 108 | .tern-port 109 | 110 | # Stores VSCode versions used for testing VSCode extensions 111 | .vscode-test 112 | 113 | # yarn v2 114 | .yarn/cache 115 | .yarn/unplugged 116 | .yarn/build-state.yml 117 | .yarn/install-state.gz 118 | .pnp.* 119 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Node.js Developer Container (`devcontainer`) 2 | 3 | ## Usage 4 | 5 | ### Setup 6 | 7 | #### Running with Docker Desktop 8 | 9 | To run locally on your machine, you'll want to install [Docker Desktop](https://www.docker.com/products/docker-desktop/) and start it up. 10 | 11 | It's recommended to use Visual Studio Code with the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) 12 | installed, but you can also run the container directly with Docker CLI or the [Dev Container CLI](https://github.com/devcontainers/cli), or attach any editor that supports the concept of [`devcontainers`](https://containers.dev/) to this container. 13 | 14 | Once you've got Docker Desktop running, you can run the following command to pull and start the image: 15 | 16 | ```sh 17 | docker pull nodejs/devcontainer:nightly 18 | docker run -it nodejs/devcontainer:nightly /bin/bash 19 | ``` 20 | 21 | To use it as a devcontainer, create a `.devcontainer/devcontainer.json` file in the project with the following content: 22 | 23 | ```json 24 | { 25 | "name": "Node.js Dev Container", 26 | "image": "nodejs/devcontainer:nightly", 27 | "workspaceMount": "source=${localWorkspaceFolder},target=/home/developer/nodejs/node,type=bind,consistency=cached", 28 | "workspaceFolder": "/home/developer/nodejs/node", 29 | "remoteUser": "developer", 30 | "mounts": [ 31 | "source=build-cache,target=/home/developer/nodejs/node/out,type=volume" 32 | ], 33 | "postCreateCommand": "git restore-mtime" 34 | } 35 | ``` 36 | 37 | For example, to use it with Visual Studio Code, use the "Dev Containers: Reopen in Container" command from the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`). After the container is built and started, you should be inside the container with the project mounted in the working directory, while the build cache volume mounted at `out/` to speed up builds. 38 | 39 | ### Working in the Container 40 | 41 | - The project is located at `/home/developer/nodejs/node`. After the container is started, you should be automatically placed in this directory. 42 | - If you want to build the project in the container, run with `ninja` (rather than just `make`): 43 | - To build the release build, run `ninja -C out/Release` 44 | - The container comes with a release build that can be picked up by `ninja`. As long as your mounted local checkout is not too far behind the checkout in the container, incremental builds should be fast. 45 | - If you notice that the build is not picking up your changes after checking out a different branch, run `git restore-mtime` in the container to sync the mtimes of the files in your checkout with the git commit timestamps. 46 | - You can also set up a git hook to sync the mtime automatically on checkout to keep the build cache effective. From the container, run: 47 | 48 | ```bash 49 | mkdir -p /home/developer/nodejs/node/.git/hooks 50 | cp /home/developer/scripts/post-checkout /home/developer/nodejs/node/.git/hooks/post-checkout 51 | ``` 52 | 53 | Note that if you install this git hook to your mounted project, and you still wish to run `git checkout` from you local system, you will need to install [`git-restore-mtime`](https://github.com/MestreLion/git-tools) on your local system as well. 54 | 55 | ### Personal Configuration 56 | 57 | Do this from your local system, not in the container. The `git` configuration will be used in the container since the project is mounted from your local system. 58 | 59 | - Set the git `origin` to your own fork rather than `nodejs/node` 60 | - Example, where `USERNAME` is your GitHub username: `$ git remote set-url origin https://github.com/USERNAME/node.git` 61 | - Verify the remote is valid: `git remote -v` 62 | - Set up your git name and email 63 | - `git config --global user.name "YOUR NAME"` 64 | - `git config --global user.email "YOUR@EMAIL.TLD"` 65 | - Add your SSH key 66 | - Preferably one that's already [published to GitHub](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account) 67 | - Alternatively, you can install the [`gh` CLI](https://cli.github.com/) and run `gh auth login` to login and add a new key. 68 | 69 | ## Development 70 | 71 | Some useful commands: 72 | - `docker build .` - build the current Dockerfile 73 | - `docker image ls` - list the images and IDs 74 | - `docker run -it /bin/bash` - run a container and shell into it 75 | - `docker tag devcontainer:nightly` - run to tag an image as `nightly` 76 | 77 | 78 | ### Tips and Tricks for Debugging Failed Builds and Otherwise Developing in This Repo 79 | 80 | Some notes on what's been helpful: 81 | 82 | - Break up the `RUN` statement in the [Dockerfile][] into multiple `RUN` statements, each containing a single command. This provies more precise information about what exactly is failing if the Docker build fails and isn't providing helpful output. 83 | - Sometimes removing the `RUN` statement in the [Dockerfile][] and running `docker build`, running the built container, and individually running each command in the running container is a better development experience than working outside of the built container. 84 | 85 | [Dockerfile]: ./Dockerfile 86 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | 2 | # Contributor Covenant Code of Conduct 3 | 4 | ## Our Pledge 5 | 6 | We as members, contributors, and leaders pledge to make participation in our 7 | community a harassment-free experience for everyone, regardless of age, body 8 | size, visible or invisible disability, ethnicity, sex characteristics, gender 9 | identity and expression, level of experience, education, socio-economic status, 10 | nationality, personal appearance, race, caste, color, religion, or sexual identity 11 | and orientation. 12 | 13 | We pledge to act and interact in ways that contribute to an open, welcoming, 14 | diverse, inclusive, and healthy community. 15 | 16 | ## Our Standards 17 | 18 | Examples of behavior that contributes to a positive environment for our 19 | community include: 20 | 21 | * Demonstrating empathy and kindness toward other people 22 | * Being respectful of differing opinions, viewpoints, and experiences 23 | * Giving and gracefully accepting constructive feedback 24 | * Accepting responsibility and apologizing to those affected by our mistakes, 25 | and learning from the experience 26 | * Focusing on what is best not just for us as individuals, but for the 27 | overall community 28 | 29 | Examples of unacceptable behavior include: 30 | 31 | * The use of sexualized language or imagery, and sexual attention or 32 | advances of any kind 33 | * Trolling, insulting or derogatory comments, and personal or political attacks 34 | * Public or private harassment 35 | * Publishing others' private information, such as a physical or email 36 | address, without their explicit permission 37 | * Other conduct which could reasonably be considered inappropriate in a 38 | professional setting 39 | 40 | ## Enforcement Responsibilities 41 | 42 | Community leaders are responsible for clarifying and enforcing our standards of 43 | acceptable behavior and will take appropriate and fair corrective action in 44 | response to any behavior that they deem inappropriate, threatening, offensive, 45 | or harmful. 46 | 47 | Community leaders have the right and responsibility to remove, edit, or reject 48 | comments, commits, code, wiki edits, issues, and other contributions that are 49 | not aligned to this Code of Conduct, and will communicate reasons for moderation 50 | decisions when appropriate. 51 | 52 | ## Scope 53 | 54 | This Code of Conduct applies within all community spaces, and also applies when 55 | an individual is officially representing the community in public spaces. 56 | Examples of representing our community include using an official e-mail address, 57 | posting via an official social media account, or acting as an appointed 58 | representative at an online or offline event. 59 | 60 | ## Enforcement 61 | 62 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 63 | reported to the community leaders responsible for enforcement at 64 | hello@bnb.im. 65 | All complaints will be reviewed and investigated promptly and fairly. 66 | 67 | All community leaders are obligated to respect the privacy and security of the 68 | reporter of any incident. 69 | 70 | ## Enforcement Guidelines 71 | 72 | Community leaders will follow these Community Impact Guidelines in determining 73 | the consequences for any action they deem in violation of this Code of Conduct: 74 | 75 | ### 1. Correction 76 | 77 | **Community Impact**: Use of inappropriate language or other behavior deemed 78 | unprofessional or unwelcome in the community. 79 | 80 | **Consequence**: A private, written warning from community leaders, providing 81 | clarity around the nature of the violation and an explanation of why the 82 | behavior was inappropriate. A public apology may be requested. 83 | 84 | ### 2. Warning 85 | 86 | **Community Impact**: A violation through a single incident or series 87 | of actions. 88 | 89 | **Consequence**: A warning with consequences for continued behavior. No 90 | interaction with the people involved, including unsolicited interaction with 91 | those enforcing the Code of Conduct, for a specified period of time. This 92 | includes avoiding interactions in community spaces as well as external channels 93 | like social media. Violating these terms may lead to a temporary or 94 | permanent ban. 95 | 96 | ### 3. Temporary Ban 97 | 98 | **Community Impact**: A serious violation of community standards, including 99 | sustained inappropriate behavior. 100 | 101 | **Consequence**: A temporary ban from any sort of interaction or public 102 | communication with the community for a specified period of time. No public or 103 | private interaction with the people involved, including unsolicited interaction 104 | with those enforcing the Code of Conduct, is allowed during this period. 105 | Violating these terms may lead to a permanent ban. 106 | 107 | ### 4. Permanent Ban 108 | 109 | **Community Impact**: Demonstrating a pattern of violation of community 110 | standards, including sustained inappropriate behavior, harassment of an 111 | individual, or aggression toward or disparagement of classes of individuals. 112 | 113 | **Consequence**: A permanent ban from any sort of public interaction within 114 | the community. 115 | 116 | ## Attribution 117 | 118 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 119 | version 2.1, available at 120 | [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. 121 | 122 | Community Impact Guidelines were inspired by 123 | [Mozilla's code of conduct enforcement ladder][Mozilla CoC]. 124 | 125 | For answers to common questions about this code of conduct, see the FAQ at 126 | [https://www.contributor-covenant.org/faq][FAQ]. Translations are available 127 | at [https://www.contributor-covenant.org/translations][translations]. 128 | 129 | [homepage]: https://www.contributor-covenant.org 130 | [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html 131 | [Mozilla CoC]: https://github.com/mozilla/diversity 132 | [FAQ]: https://www.contributor-covenant.org/faq 133 | [translations]: https://www.contributor-covenant.org/translations 134 | 135 | --------------------------------------------------------------------------------