This project contains Docker container images that provide a command line development environment for use with VS Code.
If your don’t want to see the occasional garbled character, you’ll need to install a couple of fonts and set your terminal emulator to use the Nerd Font.
-
A Nerd Font installed and enabled in your terminal
-
An emoji font e.g.
Debian/Ubuntusudo apt install fonts-noto-color-emoji
RedHat/Amazonsudo dnf install google-noto-emoji-fonts
The base container is the smallest container for development that doesn’t require Docker or Kubernetes.
In addition to basic GNU/Linux command line tools this container contains the following:
-
bat a
cat
alternative with syntax highlighting -
btop a color
top
alternative with broader information -
Delta for more readable diffs
-
duf a
df
alternative with easier to read output -
Dust a
du
alternative with easier to read output -
fd an easier to use
find
alternative -
fzf a general-purpose command-line fuzzy finder
-
fzf-tab use
fzf
for tab-completion -
Generic Colouriser add color output to many basic GNU/Linux commands
-
GitHub CLI to make GitHub easier to work with from the command line
-
Glances a color
top
alternative with broader information -
hexyl hex viewer
-
htop a color
top
alternative -
HTTPie easier to use
curl
alternative with color output -
HTTP Prompt interactive interface to HTTPie
-
Hurl for testing REST APIs
-
hyperfine benchmarking tool
-
lazygit a terminal UI for git commands
-
LSD (LSDeluxe) a
ls
/tree
alternative with color and icons -
Node Version Manager for installing/managing versions of Node.js
-
jq for manipulating JSON
-
Oh My Zsh for tab-completion and aliases
-
Pipenv for managing Python dependencies/virtualenvs
-
pipx for installing Python applications
-
procs a
ps
alternative with color and keyword search -
ripgrep for searching files/directories for text
-
sd easy to use
sed
alternative -
SDKMAN! for installing/managing SDKs such as Java and Maven
-
ssh-tools command line utilities for SSH
-
starship a full featured shell prompt
-
The Silver Searcher for searching files/directories for text
-
Tokei view stats about your code
-
vim-airline status/tabline for vim
-
You Should Use to remind you of available shell aliases
-
zoxide easily navigate to previous directories
-
zimfw for managing Zsh plugins (including Oh My Zsh)
-
zsh-autosuggestions suggests commands as you type based on history and completions
-
zsh-syntax-highlighting syntax highlighting for the command line
If you just want to try it out, you can run it standalone:
docker run --rm -ti ghcr.io/gantsign/devcontainer-base
First you need to create a .devcontainer/devcontainer.json
file in the root
of your project:
// For format details, see https://aka.ms/devcontainer.json
{
"name": "GantSign",
"build": {
"dockerfile": "Dockerfile",
},
"settings": {
"editor.renderWhitespace": "all",
"editor.rulers": [
80,
100,
120
],
"editor.guides.bracketPairs": true
},
"extensions": [
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig"
],
"forwardPorts": [],
"mounts": [
"source=devcontainer-history,target=/home/dev/.shell_history,type=volume",
"source=devcontainer-zoxide,target=/home/dev/.local/share/zoxide,type=volume"
],
"runArgs": [
// [Optional] Uncomment for improved security, requires https://github.com/nestybox/sysbox to be installed
// "--runtime=sysbox-runc"
],
"remoteUser": "dev",
}
Then you need to create a Dockerfile:
FROM ghcr.io/gantsign/devcontainer-base
# ** [Optional] Uncomment this section to install additional packages. **
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# ** [Optional] Uncomment this section to install SDKs. **
# SHELL [ "/usr/bin/bash", "--login", "-c" ]
# RUN sdk_install java 11
# RUN sdk_install maven 3
# RUN nvm install --lts
Then press Ctrl-P
and select "Remote-Containers: Open Folder in Container…"
from the menu.
For when you need to use Docker for development. The DinD container contains everything in the base container as well as Docker-in-Docker and related tools.
In addition to the tools in the base container the DinD container also contains the following:
-
ctop a
top
like tool for containers -
dive a tool for exploring Docker images
-
Docker the most well know container tool
-
Docker Compose a tool for defining and running multi-container Docker applications
-
Lazydocker a simple terminal UI for Docker & Docker Compose
First you need to create a .devcontainer/devcontainer.json
file in the root
of your project:
// For format details, see https://aka.ms/devcontainer.json
{
"name": "GantSign",
"build": {
"dockerfile": "Dockerfile",
},
"settings": {
"editor.renderWhitespace": "all",
"editor.rulers": [
80,
100,
120
],
"editor.guides.bracketPairs": true
},
"extensions": [
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig"
],
"forwardPorts": [],
"mounts": [
"source=devcontainer-history,target=/home/dev/.shell_history,type=volume",
"source=devcontainer-zoxide,target=/home/dev/.local/share/zoxide,type=volume",
// To preserve Docker images between runs
"source=devcontainer-docker,target=/var/lib/docker,type=volume"
],
"runArgs": [
// Requires https://github.com/nestybox/sysbox to be installed
"--runtime=sysbox-runc"
],
"remoteUser": "dev",
// So the Docker init script runs
"overrideCommand": false
}
ℹ️
|
For Docker-in-Docker to work, it either needs to be run with
sysbox |
Then you need to create a Dockerfile:
FROM ghcr.io/gantsign/devcontainer-dind
# ** [Optional] Uncomment this section to install additional packages. **
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# ** [Optional] Uncomment this section to install SDKs. **
# SHELL [ "/usr/bin/bash", "--login", "-c" ]
# RUN sdk_install java 11
# RUN sdk_install maven 3
# RUN nvm install --lts
Then press Ctrl-P
and select "Remote-Containers: Open Folder in Container…"
from the menu.
For when you need to use Kubernetes for development. The K8s container contains everything in the DinD container as well as K3s and related tools.
In addition to the tools in the DinD container the K3s container also contains the following:
-
Helm Kubernetes package manager
-
K3s lightweight Kubernetes distribution
-
k9s terminal UI for Kubernetes
-
kubectx for switching between Kubernetes contexts
-
kubens for switching between Kubernetes namespaces
-
Kustomize for customizing application configuration
-
stern allows you to
tail
multiple pods -
Telepresence bridge between local dev and your Kubernetes cluster
First you need to create a .devcontainer/devcontainer.json
file in the root
of your project:
// For format details, see https://aka.ms/devcontainer.json
{
"name": "GantSign",
"build": {
"dockerfile": "Dockerfile",
},
"settings": {
"editor.renderWhitespace": "all",
"editor.rulers": [
80,
100,
120
],
"editor.guides.bracketPairs": true
},
"extensions": [
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig"
],
"forwardPorts": [],
"mounts": [
"source=devcontainer-history,target=/home/dev/.shell_history,type=volume",
"source=devcontainer-zoxide,target=/home/dev/.local/share/zoxide,type=volume",
// To preserve Docker images between runs
"source=devcontainer-docker,target=/var/lib/docker,type=volume"
],
"runArgs": [
// Requires https://github.com/nestybox/sysbox to be installed
"--runtime=sysbox-runc"
// To use Telepresence you need to use --privileged instead of Sysbox
// "--privileged"
],
"remoteUser": "dev",
// So the Docker & K3s init script runs
"overrideCommand": false
}
ℹ️
|
For Docker-in-Docker or K3s to work, they either needs to be run with
sysbox |
❗
|
For Telepresence to work you need to run the container with the |
Then you need to create a Dockerfile:
FROM ghcr.io/gantsign/devcontainer-k8s
# ** [Optional] Uncomment this section to install additional packages. **
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# ** [Optional] Uncomment this section to install SDKs. **
# SHELL [ "/usr/bin/bash", "--login", "-c" ]
# RUN sdk_install java 11
# RUN sdk_install maven 3
# RUN nvm install --lts
# ** [Optional] Uncomment this section if you don't want to run K3s on start. **
# ENTRYPOINT ["/usr/local/share/docker-init.sh"]
# CMD ["sleep", "infinity"]
Then press Ctrl-P
and select "Remote-Containers: Open Folder in Container…"
from the menu.
Unlike the other containers this isn’t based on the base container.
In addition to basic GNU/Linux command line tools this container contains the following:
-
https://github.com/devcontainers/features/tree/main/src/common-utils
-
Oh My Zsh for tab-completion and aliases
-
-
https://github.com/devcontainers/features/tree/main/src/docker-in-docker
-
https://github.com/devcontainers/features/tree/main/src/github-cli
-
GitHub CLI to make GitHub easier to work with from the command line
-
-
https://github.com/devcontainers-contrib/features/tree/main/src/apt-get-packages
-
fzf a general-purpose command-line fuzzy finder
-
Generic Colouriser add color output to many basic GNU/Linux commands
-
ShellCheck static analysis tool for shell scripts
-
zoxide easily navigate to previous directories
-
-
https://github.com/devcontainers-contrib/features/tree/main/src/fd
-
fd an easier to use
find
alternative
-
-
https://github.com/devcontainers-contrib/features/tree/main/src/ripgrep
-
ripgrep for searching files/directories for text
-
-
https://github.com/devcontainers-contrib/features/tree/main/src/
-
shfmt shell script formatter
-
-
https://github.com/devcontainers-contrib/features/tree/main/src/starship
-
starship a full featured shell prompt
-
-
https://github.com/devcontainers-contrib/features/tree/main/src/zsh-plugins
-
zsh-autosuggestions suggests commands as you type based on history and completions
-
zsh-syntax-highlighting syntax highlighting for the command line
-
If you just want to try it out, you can run it standalone:
docker run --rm -ti --user vscode --entrypoint zsh ghcr.io/gantsign/devcontainer-python3.10
Create a .devcontainer/devcontainer.json
file in the root of your project:
// For format details, see https://aka.ms/devcontainer.json
{
"name": "GantSign",
"image": "ghcr.io/gantsign/devcontainer-python3.10",
"settings": {
"editor.renderWhitespace": "all",
"editor.rulers": [
80,
100,
120
],
"editor.guides.bracketPairs": true
},
"extensions": [
"streetsidesoftware.code-spell-checker",
"editorconfig.editorconfig"
],
"runArgs": [
// [Optional] Uncomment for improved security, requires https://github.com/nestybox/sysbox to be installed
// "--runtime=sysbox-runc"
]
}
ℹ️
|
For Docker-in-Docker to work, it either needs to be run with
sysbox |
This project uses the Unlicense but the resulting container images contain software under various different open-source licenses.