Publishing a Docker Container for MS Edit to the GitHub Container Registry

https://news.ycombinator.com/rss Hits: 1
Summary

Publishing a Docker container for Microsoft Edit to the GitHub Container Registry Microsoft recently released Edit, a new terminal text editor written in Rust. It's pretty nice - it's reminiscent of nano but with a retro MS DOS feel. I wanted to run it on my Apple Silicon Mac. Microsoft don't (yet) provide compiled builds for that platform, but they do have a release for aarch64-linux-gnu. I figured I'd run that in o Docker container (I have Docker for Desktop installed) to try it out. One thing lead to another and I ended up creating and shipping a new Docker image to GitHub's Container Registry. This means anyone with an Apple Silicon Mac and Docker can try out edit against the files in their current directory by running this command: docker run --platform linux/arm64 -it --rm -v $(pwd):/workspace ghcr.io/simonw/alpine-edit Hit Ctrl+Q or use your mouse to acces File -> Exit to exit the editor and terminate the container. I did almost all of my figuring out for this project in this 25 minute Claude Conversation. This post is the edited highlights of what I learned. Running it first as a one-liner I started by figuring out a shell one-liner for running the binary. This took a few tries - it turned out Microsoft's compiled binary needed glibc and my first choice of base image, alpine, used musl instead. I got it working using an Ubuntu base image like this: docker run --platform linux/arm64 -it --rm \ -v $(pwd):/workspace \ -w /workspace ubuntu:latest sh -c " apt update && \ apt install -y zstd curl && \ curl -L https://github.com/microsoft/edit/releases/download/v1.2.0/edit-1.2.0-aarch64-linux-gnu.tar.zst -o edit.tar.zst && \ zstd -d edit.tar.zst && \ tar -xf edit.tar && \ chmod +x edit && \ exec bash" Running this command drops you into Bash in the container - running ./edit then opens the editor. I managed to get Alpine working too by having it install the gcompat package: docker run --platform linux/arm64 -it --rm \ -v $(pwd):/workspace \ -w /workspace alpine:lat...

First seen: 2025-06-22 00:43

Last seen: 2025-06-22 00:43