/airy-docker-emacs

Featherweight Emacs in a Docker

Primary LanguageDockerfileGNU General Public License v3.0GPL-3.0

Featherweight Emacs in a Docker

A super lightweight emacs in your docker

The contemporary version of this package is Silex/docker-emacs.

Usage

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.

Available Tags

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

Why?

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.

  1. It’s large, with even the smallest images weighing in at over 200mb.
  2. Dev images (with cask) contain all of Emacs build dependencies, which are generally unneeded at run time.
  3. It is self-compiled, which can lead to missing features (making sure everything is properly compiled is a pain)
  4. Suffers from moby/moby#22801
  5. 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.

Overview

jgkamat/airy-docker-emacs is:

  1. Built from alpine/alpine, so it’s as small as possible
  2. Built using Emacs packages provided from alpine, so they are properly tested and maintained
  3. Builds in seconds, rather than minutes
  4. An automated build
  5. Easily buildable on any machine.
  6. Dead simple (take a look at the dockerfiles).
  7. Includes cask versions (for CI) (append -cask to tag)

jgkamat/airy-docker-emacs is NOT:

  1. Able to provide specific Emacs versions older than 25.1 (the oldest version packaged by alpine).
  2. Able to provide Emacs versions not packaged by Alpine yet (will always include dev and snapshot releases).

Size Comparison

RepoSize
silex/docker-emacs:25.2455GB
silex/docker-emacs:25.2-dev1.37GB
silex/docker-emacs:25.2-alpine223MB
silex/docker-emacs:25.2-alpine-dev1.16GB
jgkamat/airy-docker-emacs:25.2125MB
jgkamat/airy-docker-emacs:25.2-cask192MB

Cacheless Build Time

(I understand this is not a fair comparison, but I can’t build these on my laptop to find out anyway)

RepoTime
Silex/docker-emacs:25 (travis)16 minutes
jgkamat/airy-docker-emacs:25.2 (laptop)5s

Personal Dotfile Build Time

Results are from emacs byte compilation of my dotfiles and their dependencies in circleci

RepoBuild TimeSource
Silex/docker-emacs:25 (outdated)1:20build 262
jgkamat/airy-docker-emacs:25.20:56build 304