The devcontainer from OneFootball data engineering.
The first devcontainer
in src
installs software, dotfiles, and repos. The image is published in Github. The second devcontainer
in .devcontainer
runs the published image and it has the list of the repos used by the team.
# locally
gh cs create -R motain/codespaces-data-engineering -m basicLinux32gb
gh cs ssh
# inside the container
zellij attach --create <name of the session>
emacs
# check the creation of the devcontainer for problems
tail -f /workspaces/.codespaces/.persistedshare/creation.log
# Vscode development
gh cs code
Repeat all the steps above up to zellij to test the sharing your terminal feature
The common operations are adding or updating dotfiles
or adding new software. Add a new dotfile to src/.devcontainer/dotfiles
and add a new entry to src/.devcontainer/dd.edn
. New software is installed in src/.devcontainer/local-features/of/install.sh
. Every change requires to publish a new image and the sha of the image needs to be committed to .devcontainer/devcontainer.json
# local feature development
bb build
bb up
The build takes more than 30 mins. To speed up the inner loop, we leverage docker caching and we temporary disable steps in the build itself src/.devcontainer/devcontainer.json
The token generated by Github for Codespaces cannot push an image to ghcr
. You can create a personal token and login again.
bb push
The following secrets need to be created in https://github.com/settings/codespaces of the user creating the codespace.
ATUIN_LOGIN=atuin login -u USER -p PASSWORD -k PASSPHRASE
# permissions needed
# codespace, gist, read:org, repo, workflow, write:packages
GHP_TOKEN=ghp_xxx
Co-authored-by: Alberto Miorin <109069886+alberto-of@users.noreply.github.com>
Co-authored-by: Valery Lavrentiev <valery.lavrentiev@onefootball.com>
Co-authored-by: Marlon Rozindo <151554259+felixmarlon@users.noreply.github.com>