A super lightweight emacs in your docker
The contemporary version of this package is Silex/docker-emacs.
Get it at jgkamat/emacs!
docker run -ti jgkamat/emacs:25.2 emacs
I’ll try to support as many versions of emacs as alpine will, submit a PR if you find anything lacking.
In addition to these tags, all tags have a -cask
variant that contains cask preinstalled.
jgkamat/emacs:25.1
jgkamat/emacs:25.2
jgkamat/emacs:26.1
jgkamat/emacs:26.2
jgkamat/emacs:26.3
I use Emacs for many things, not just for editing text! For example, I generate almost 100% of my written content in the fantastic org-mode. I need docker images of emacs to run these, for quick and reproducible builds.
While Silex/docker-emacs is probably the best environment to get started on, it is lacking quite a bit for my use case.
- It’s large, with even the smallest images weighing in at over 200mb.
- Dev images (with cask) contain all of Emacs build dependencies, which are generally unneeded at run time.
- It is self-compiled, which can lead to missing features (making sure everything is properly compiled is a pain)
- Suffers from moby/moby#22801
- It is not an autobuild (leading to trust issues).
While Silex/docker-emacs is useful if you want to test on specific emacs versions (since it compiles it’s own version it can achieve this), this is not 100% necessary for many usecases.
jgkamat/airy-docker-emacs is:
- Built from alpine/alpine, so it’s as small as possible
- Built using Emacs packages provided from alpine, so they are properly tested and maintained
- Builds in seconds, rather than minutes
- An automated build
- Easily buildable on any machine.
- Dead simple (take a look at the dockerfiles).
- Includes cask versions (for CI) (append
-cask
to tag)
jgkamat/airy-docker-emacs is NOT:
- Able to provide specific Emacs versions older than 25.1 (the oldest version packaged by alpine).
- Able to provide Emacs versions not packaged by Alpine yet (will always include dev and snapshot releases).
Repo | Size |
---|---|
silex/docker-emacs:25.2 | 455GB |
silex/docker-emacs:25.2-dev | 1.37GB |
silex/docker-emacs:25.2-alpine | 223MB |
silex/docker-emacs:25.2-alpine-dev | 1.16GB |
jgkamat/airy-docker-emacs:25.2 | 125MB |
jgkamat/airy-docker-emacs:25.2-cask | 192MB |
(I understand this is not a fair comparison, but I can’t build these on my laptop to find out anyway)
Repo | Time |
---|---|
Silex/docker-emacs:25 (travis) | 16 minutes |
jgkamat/airy-docker-emacs:25.2 (laptop) | 5s |
Results are from emacs byte compilation of my dotfiles and their dependencies in circleci
Repo | Build Time | Source |
---|---|---|
Silex/docker-emacs:25 (outdated) | 1:20 | build 262 |
jgkamat/airy-docker-emacs:25.2 | 0:56 | build 304 |