The code and data behind xeiaso.net
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat(notes): experiment with dev containers

Signed-off-by: Xe Iaso <me@xeiaso.net>

Xe Iaso aff78cdf 6a4359f6

+39 -1
+15 -1
.devcontainer/Dockerfile
··· 1 - FROM ghcr.io/xe/devcontainer-base/pre/go 1 + FROM alpine:3.21 AS dhall-json 2 + 3 + ARG DHALL_VERSION=1.42.2 4 + ARG DHALL_JSON_VERSION=1.7.12 5 + RUN mkdir -p /app 6 + WORKDIR /app 7 + RUN set -x \ 8 + && apk add -U curl bzip2 ca-certificates \ 9 + && curl -L -o dhall-linux.tar.bz2 https://github.com/dhall-lang/dhall-haskell/releases/download/${DHALL_VERSION}/dhall-json-${DHALL_JSON_VERSION}-x86_64-linux.tar.bz2 \ 10 + && tar -xvjf dhall-linux.tar.bz2 \ 11 + && mv bin/dhall-to-json . 12 + 13 + FROM ghcr.io/xe/devcontainer-base/pre/go 14 + 15 + COPY --from=dhall-json /app/dhall-to-json /usr/local/bin/dhall-to-json
+3
.devcontainer/devcontainer.json
··· 9 9 "type=registry,ref=ghcr.io/xe/site/devcontainer" 10 10 ] 11 11 }, 12 + "runArgs": [ 13 + "--net=host" 14 + ], 12 15 // Features to add to the dev container. More info: https://containers.dev/features. 13 16 "features": { 14 17 "ghcr.io/xe/devcontainer-features/deno:1.2.1": {},
+21
lume/src/notes/2025/devcontainers.mdx
··· 1 + --- 2 + title: "Experimenting with Development containers" 3 + desc: "Development containers are cool and I want to see if they work out in practice." 4 + date: 2025-06-30 5 + --- 6 + 7 + A few years ago I was introduced to the idea of [Development containers](https://containers.dev/) by a former coworker. I was deep into the Nix koolaid at the time, so I thought they were kinda superfluous and ultimately not worth looking into. After having run a [fairly popular open source project](https://github.com/TecharoHQ/anubis) for a while, I've come to realize that setting up a development environment for it is actually a fair bit harder than it seems. I want to make it easy to contribute to the project, and one of the best ways I can do that is by lowering the skill floor for contribution. 8 + 9 + As such, I'm starting to experiment with development containers across my projects. I wrote this article from inside a development container on my Macbook. If you want to play around with my development environment Techaro's package builder yeet, you can [clone its repo from GitHub](https://github.com/TecharoHQ/yeet) and activate the development container. You will get a known working configuration that you can use to build new and exciting things. 10 + 11 + Notably, these development containers also allow you to use [GitHub Codespaces](https://github.com/features/codespaces) to contribute. This means you don't even need to have a machine that's able to run Linux containers. You can contribute from any machine that can run GitHub Codespaces. 12 + 13 + This is still an experiment, and here are the criteria I'm using to determine if this will be a success or not: 14 + 15 + 1. Can people that don't really understand much about the stack behind projects clone a repo and get the software to build or run? 16 + 2. Does this help lower the skill floor to make it easier to contribute to those projects? 17 + 3. Will this finally get Anubis' integration tests to run consistently across OSes? 18 + 19 + The main reason I was inspired to try this out was after I heard a YouTuber describe what AI assisted code editing felt like for new developers: it feels like being a senior developer where you just have things flow out of your hands and you're able to make new and exciting things. I think the Techaro way of giving people that kind of experience to someone would be letting you get the development environment of a senior developer, akin to what it feels like to use an expert mechanic's garage to fix your car. When you clone the repos I'm testing with, you get a version of the configuration that I use, modulo the parts that don't make the most sense for running inside containers. 20 + 21 + I'm super excited to see how this turns out. Maybe it'll be a good thing, maybe it won't. Only one way to know for sure!