Dockerized code-server
.
Tag | Dockerfile Build Context |
---|---|
:4.93.1 , :latest |
View |
:4.93.1-docker |
View |
:4.93.1-docker-go-1.20.14 |
View |
:4.93.1-docker-rootless |
View |
:4.93.1-docker-rootless-go-1.20.14 |
View |
:4.92.2 |
View |
:4.92.2-docker |
View |
:4.92.2-docker-go-1.20.14 |
View |
:4.92.2-docker-rootless |
View |
:4.92.2-docker-rootless-go-1.20.14 |
View |
:4.91.1 |
View |
:4.91.1-docker |
View |
:4.91.1-docker-go-1.20.14 |
View |
:4.91.1-docker-rootless |
View |
:4.91.1-docker-rootless-go-1.20.14 |
View |
:4.90.3 |
View |
:4.90.3-docker |
View |
:4.90.3-docker-go-1.20.14 |
View |
:4.90.3-docker-rootless |
View |
:4.90.3-docker-rootless-go-1.20.14 |
View |
:4.89.1 |
View |
:4.89.1-docker |
View |
:4.89.1-docker-go-1.20.14 |
View |
:4.89.1-docker-rootless |
View |
:4.89.1-docker-rootless-go-1.20.14 |
View |
:4.23.1 |
View |
:4.23.1-docker |
View |
:4.23.1-docker-go-1.20.14 |
View |
:4.23.1-docker-rootless |
View |
:4.23.1-docker-rootless-go-1.20.14 |
View |
:4.22.1 |
View |
:4.22.1-docker |
View |
:4.22.1-docker-go-1.20.14 |
View |
:4.22.1-docker-rootless |
View |
:4.22.1-docker-rootless-go-1.20.14 |
View |
:4.21.2 |
View |
:4.21.2-docker |
View |
:4.21.2-docker-go-1.20.14 |
View |
:4.21.2-docker-rootless |
View |
:4.21.2-docker-rootless-go-1.20.14 |
View |
:4.20.1 |
View |
:4.20.1-docker |
View |
:4.20.1-docker-go-1.20.14 |
View |
:4.20.1-docker-rootless |
View |
:4.20.1-docker-rootless-go-1.20.14 |
View |
:4.19.1 |
View |
:4.19.1-docker |
View |
:4.19.1-docker-go-1.20.14 |
View |
:4.19.1-docker-rootless |
View |
:4.19.1-docker-rootless-go-1.20.14 |
View |
:4.18.0 |
View |
:4.18.0-docker |
View |
:4.18.0-docker-go-1.20.14 |
View |
:4.18.0-docker-rootless |
View |
:4.18.0-docker-rootless-go-1.20.14 |
View |
:4.17.1 |
View |
:4.17.1-docker |
View |
:4.17.1-docker-go-1.20.14 |
View |
:4.17.1-docker-rootless |
View |
:4.17.1-docker-rootless-go-1.20.14 |
View |
:4.16.1 |
View |
:4.16.1-docker |
View |
:4.16.1-docker-go-1.20.14 |
View |
:4.16.1-docker-rootless |
View |
:4.16.1-docker-rootless-go-1.20.14 |
View |
:4.15.0 |
View |
:4.15.0-docker |
View |
:4.15.0-docker-go-1.20.14 |
View |
:4.15.0-docker-rootless |
View |
:4.15.0-docker-rootless-go-1.20.14 |
View |
:4.14.1 |
View |
:4.14.1-docker |
View |
:4.14.1-docker-go-1.20.14 |
View |
:4.14.1-docker-rootless |
View |
:4.14.1-docker-rootless-go-1.20.14 |
View |
:4.13.0 |
View |
:4.13.0-docker |
View |
:4.13.0-docker-go-1.20.14 |
View |
:4.13.0-docker-rootless |
View |
:4.13.0-docker-rootless-go-1.20.14 |
View |
:4.12.0 |
View |
:4.12.0-docker |
View |
:4.12.0-docker-go-1.20.14 |
View |
:4.12.0-docker-rootless |
View |
:4.12.0-docker-rootless-go-1.20.14 |
View |
:4.11.0 |
View |
:4.11.0-docker |
View |
:4.11.0-docker-go-1.20.14 |
View |
:4.11.0-docker-rootless |
View |
:4.11.0-docker-rootless-go-1.20.14 |
View |
Base variants are based on alpine
, and include npm 8
and nodejs 16
(to run code-server
), pwsh
, and basic tools. E.g. 4.93.1
Incremental variants include additional tools and their code
extensions:
docker
: dockerdocker-rootless
: Rootless dockergo
: go
docker run --name code-server --rm -it -p 127.0.0.1:8080:8080 theohbrothers/docker-code-server:4.93.1
# code-server is now available at http://127.0.0.1:8080. To login, use the password in the config file:
docker exec code-server sh -c 'cat ~/.config/code-server/config.yaml'
To disable password authentication, use --auth=none
:
docker run --name code-server --rm -it -p 127.0.0.1:8080:8080 theohbrothers/docker-code-server:4.93.1 --bind-addr=0.0.0.0:8080 --auth=none --disable-telemetry --disable-update-check
docker run --name code-server --rm -it --privileged -v docker:/var/lib/docker -p 127.0.0.1:8080:8080 theohbrothers/docker-code-server:4.93.1-docker
# code-server is now available at http://127.0.0.1:8080. To login, use the password in the config file:
docker exec code-server sh -c 'cat ~/.config/code-server/config.yaml'
To disable password authentication, use --auth=none
:
docker run --name code-server --rm -it -p 127.0.0.1:8080:8080 theohbrothers/docker-code-server:4.93.1-docker --bind-addr=0.0.0.0:8080 --auth=none --disable-telemetry --disable-update-check
To build multi-arch images using docker buildx
, the host must have kernel >= 4.8
, and must have setup qemu
in the kernel (see here):
# This must be run on each reboot on the host to setup qemu
docker run --rm --privileged tonistiigi/binfmt:latest --install all
Then, buildx
multi-arch builds are now available in the container:
# Create a builder and use it
docker buildx create --name mybuilder --driver docker-container
docker buildx use mybuilder
docker buildx ls # Should show several platforms
docker buildx inspect mybuilder # Should show several platforms
# Build
docker buildx build ...
docker run --name code-server --rm -it --privileged -p 127.0.0.1:8080:8080 theohbrothers/docker-code-server:4.93.1-docker-rootless
# code-server is now available at http://127.0.0.1:8080. To login, use the password in the config file:
docker exec code-server sh -c 'cat ~/.config/code-server/config.yaml'
To start code-server without password authentication, use --auth=none
:
docker run --name code-server --rm -it -p 127.0.0.1:8080:8080 theohbrothers/docker-code-server:4.93.1-docker-rootless --bind-addr=0.0.0.0:8080 --auth=none --disable-telemetry --disable-update-check
To build multi-arch images using docker buildx
, see here.
- See official docs for code-server configuration: https://github.com/coder/code-server/blob/main/docs/FAQ.md#how-does-the-config-file-work
- The default user is named
user
with UID1000
. To escalate asroot
, usesudo
. - Users should provision their own configuration files at entrypoint. Examples include dotfiles such as
~/.bash_aliases
,~/.gitconfig
, andcode
configs such as~/.local/share/code-server/User/keybindings.json
and~/.local/share/code-server/User/settings.json
. It is recommended to use any of these utilities for managing dotfiles.
- To install a custom version of a
code
extension, set"extensions.autoCheckUpdates": true
insettings.json
. UnderExtensions
view, click the extension's cogwheel and selectInstall Another Version...
.
Requires Windows powershell
or pwsh
.
# Install Generate-DockerImageVariants module: https://github.com/theohbrothers/Generate-DockerImageVariants
Install-Module -Name Generate-DockerImageVariants -Repository PSGallery -Scope CurrentUser -Force -Verbose
# Edit ./generate templates
# Generate the variants
Generate-DockerImageVariants .
versions.json contains a list of Semver versions, one per line.
To update versions in versions.json
:
./Update-Versions.ps1
To update versions in versions.json
, and open a PR for each changed version, and merge successful PRs one after another (to prevent merge conflicts), and finally create a tagged release and close milestone:
$env:GITHUB_TOKEN = 'xxx'
./Update-Versions.ps1 -PR -AutoMergeQueue -AutoRelease
To perform a dry run, use -WhatIf
.