Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/georglauterbach/dev-container-base
Development Container Base Image for Common Tasks
https://github.com/georglauterbach/dev-container-base
containers dev-container development-container
Last synced: 5 days ago
JSON representation
Development Container Base Image for Common Tasks
- Host: GitHub
- URL: https://github.com/georglauterbach/dev-container-base
- Owner: georglauterbach
- License: mit
- Created: 2024-04-21T11:32:47.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-12-22T11:42:58.000Z (7 days ago)
- Last Synced: 2024-12-22T12:24:18.878Z (7 days ago)
- Topics: containers, dev-container, development-container
- Language: Dockerfile
- Homepage:
- Size: 96.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
= Custom Development Container Base Image
:toc::link-dev_containers: https://containers.dev/
:link-hermes: https://github.com/georglauterbach/hermes== About
When working with link:{link-dev_containers}[Development Containers], you most likely build on top of existing images to utilize their existing tools and configuration. This project provides an image packed with as many as necessary and as few as possible configurations and applications to make development a breeze. You can use this image directly, or build on top of it, when configuring your Development Container.
== Technical Information
This image
. is based on link:https://hub.docker.com/_/ubuntu[`docker.io/ubuntu`] and built for `amd64` and `arm64`. Consult link:./Dockerfile[`Dockerfile`] for the complete set of installation steps.
. heavily builds on link:{link-hermes}[_hermes_] to install sensible defaults for the console and useful additional programs. Consult the documentation of link:{link-hermes}[_hermes_] if you'd like to further customize the experience. The process is described https://github.com/georglauterbach/hermes?tab=readme-ov-file#optional-additional-setup[here].
. configures common directories (like `${HOME}/.cache`) with the correct permissions.
. sets environment variables such as
.. `DEV_CONTAINER_BASE_VERSION=#` to check that you are inside a container, to check that you are using this image as a base, and to acquire information about the actual version.
.. `DEV_CONTAINER_BASE_HERMES_VERSION=` to qcquire information about the version of link:{link-hermes}[_hermes_] that is used.
. sets up `doas` so that you can simply run `sudo` inside the container without the need to enter a password.
. sets up a system locale, defaulting to `en_US.UTF-8`.
. does not set nor require a custom `ENTRYPOINT`.== 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:
[source,jsonc]
----
{
// Persist the VS Code extension cache; do not mount to `/home/ubuntu/.vscode-server`,
// otherwise, all settings are cached and hence, not be updated anymore.
"source": "-cache-vscode_extensions",
"target": "/home/ubuntu/.vscode-server/extensions",
"type": "volume"
},
{
// Persist the `${HOME}/.cache` directory so that common
// caches are not lost on container restart.
"source": "-cache-home_cache",
"target": "/home/ubuntu/.cache",
"type": "volume"
}
----=== Locale Setup
When building on top of this image, you can call `sudo update_locales.sh ` to set a new locale. The default is `en_US.UTF-8`.