Skip to content

solodolobolo/code-server

 
 

Repository files navigation

Custom code-server Build

A custom container based on LinuxServer.io featuring code-server with integrated Docker CLI and Node.js development environments. For more information, please refer to the official linuxserver/code-server repository.

Custom Features

This build incorporates the following modifications to the standard environment:

  • Docker CLI: Installed for container orchestration (requires socket mount).
  • Node.js LTS: Integrated Node.js environment with npm@latest.
  • Passwordless Sudo: The abc user is granted NOPASSWD rights for development flexibility.

Supported Architectures

Architecture Available Tag
x86-64 amd64
arm64 arm64

Application Setup

Access the webui at http://<your-ip>:8443.

Docker CLI Usage

To use Docker commands within the code-server terminal, you must mount the host Docker socket: -v /var/run/docker.sock:/var/run/docker.sock

Note: The container currently requires sudo to run Docker commands on the host.

User Configuration

For github integration, drop your ssh key in to /config/.ssh. Set your git identity:

git config --global user.name "username"
git config --global user.email "email address"

Usage

docker-compose

---
services:
  code-server:
    image: solodolobolo/code-server:latest
    container_name: code-server
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - PASSWORD=password #optional
      - SUDO_PASSWORD=password #optional
      - DEFAULT_WORKSPACE=/config/workspace #optional
    volumes:
      - /path/to/config:/config
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 8443:8443
    restart: unless-stopped

docker cli

docker run -d \
  --name=code-server \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e PASSWORD=password \
  -p 8443:8443 \
  -v /path/to/config:/config \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --restart unless-stopped \
  custom-code-server:latest

Parameters

Parameter Function
-p 8443:8443 Web GUI port
-v /config Persistent configuration
-v /var/run/docker.sock:/var/run/docker.sock Host Docker socket for CLI access
-e PUID=1000 UserID for file permissions
-e PGID=1000 GroupID for file permissions
-e TZ=Etc/UTC Container timezone
-e PASSWORD= Web GUI access password

About

Custom linuxserver image with npm, Docker cli and passwordless sudo preinstalled.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dockerfile 100.0%