Sign inSign up

jgkamat/emacs

By jgkamat

•Updated almost 5 years ago

A super light emacs in your docker, designed for testing and automation purposes. Based on alpine

Image
0

2.8K

jgkamat/emacs repository overview

  • Featherweight Emacs in a Docker

A super lightweight emacs in your docker

The contemporary version of this package is [[https://github.com/Silex/docker-emacs][Silex/docker-emacs⁠]].

  • Usage

Get it at [[https://hub.docker.com/r/jgkamat/emacs/][jgkamat/emacs⁠]]!

#+BEGIN_SRC shell docker run -ti jgkamat/emacs:25.2 emacs #+END_SRC

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 [[http://orgmode.org/][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 [[https://github.com/moby/moby/issues/22801⁠]]
  5. It is not an autobuild ([[http://www.praqma.com/stories/trust-in-docker-images/][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

| 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 |

  • Cacheless Build Time

(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 |

  • Personal Dotfile Build Time

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 | [[https://circleci.com/gh/jgkamat/dotfiles/262][build⁠ 262]] | | jgkamat/airy-docker-emacs:25.2 | 0:56 | [[https://circleci.com/gh/jgkamat/dotfiles/304][build⁠ 304]] |

Tag summary

Content type

Image

Digest

Size

74.8 MB

Last updated

almost 5 years ago

docker pull jgkamat/emacs:26.3-cask