logo
0
0
Login
docs: add README.en.md

How to Customize Development Environment

See documentation for more details

This example demonstrates:

  • Using Dockerfile to customize development environment
  • How to modify vscode configuration: modify .ide/settings.json and copy it to container
  • How to install code-server and common extensions
  • How to enable remote-ssh support: install openssh-server

Notes on Build Speed

The first time building the development environment requires docker build to create the image, which will be pushed to the artifact repository. Subsequent remote development sessions will directly use the pre-built image. This means the first startup will be slower, but subsequent startups will be much faster.

How to Apply Dockerfile Changes

After modifying the Dockerfile:

  1. First step: Terminate current development environment
  2. Second step: Restart development environment

Build Instructions

If building .ide/Dockerfile requires other files, they must be declared in the pipeline (using docker.build.by field), otherwise errors will occur.

Example:

# .cnb.yml $: # vscode event: specifically for launching remote development from the page vscode: - docker: # Custom development environment build: # Specify Dockerfile for building image dockerfile: .ide/Dockerfile # Declare files needed for build process # Note: If other files are used during build, they must be declared here # Reference: https://docs.cnb.cool/zh/grammar/pipeline.html#build by: - .ide/settings.json services: # Enable vscode service - vscode # Enable docker commands in container - docker stages: # Commands to execute after environment starts - name: ls script: ls -al