= Custom Development Container Base Image :toc:
== About
A custom https://containers.dev/[Development Container] base image packed with as many as necessary and as few as possible configurations and applications to make development a breeze. This image is built for amd64
and arm64
. Consult link:./Dockerfile[Dockerfile
] for the complete set of installation steps.
This container image partially builds on https://github.com/georglauterbach/hermes[_Hermes_] to install sensible defaults for the console and useful additional programs. Consult the documentation of Hermes if you'd like to further customize the experience.
Additonally, we configure common directories (like ${HOME}/.cache
) with the correct permissions. We also set up doas
so that you can simply run sudo
inside the container without the need to enter a password.
You can use the environment variable DEV_CONTAINER_BASE
to check whether you are using this image as a base (and hence, whether you are inside a container). This variable, if set, contains the version of the base image and the version control system revision, separated by a #
.
We do not set a custom ENTRYPOINT
with this image because the entrypoint is overwritten by Development Containers anyway, and we want to make the additional setup optional.
== Optional Additional Setup
=== Proper Caching
To properly persist data that should be cached, you need to provide volumes in devcontainer.json
for the following directories:
${HOME}/.cache
directory
"source": "/home/ubuntu/.vscode-server
, you should mount the volume for caching extensions to /home/ubuntu/.vscode-server/extensions
. Otherwise, the Development Container settings are https://news.ycombinator.com/item?id=23113314[cached] as well, which may leed to your settings not being updated.=== Locale Setup
When building on top of this image, you can call sudo update_locales.sh <LOCALE>
to set a new locale. The default is en_US.UTF-8
.