Public Repository

Last pushed: 2 years ago
Short Description
The Emacs OS binaries and shared libraries. Uses busybox for shell utilities.
Full Description

A minimal distribution of Emacs OS 24.4 based off of the busybox image.

This uses the shell utilities from busybox since emacs depends on them.

This image was compiled from a tar file that was compiled on a Ubuntu 14.04 image. The instructions for doing this yourself are below.

Runs an bare bones Busybox/GNU/Emacs OS 24.4 distribution with minimal dependencies.
This uses busybox because emacs depends on external binaries like ls for a few parts of the built in functionality.
It could be based off of scratch and still have most features of Emacs work.

Enter M-x eshell to switch to emacs' shell mode

Replicating this build

On ubuntu:14.04 (I think debian:stable should also work, but haven't tried it)

apt-get update -y
apt-get install -y autoconf gcc libncurses5-dev make texinfo
cd /emacs
ln -s .  emacs     # we create this link to simplify config --prefix of emacs 
cp -a /dev dev     # we boldly copy the whole /dev
mkdir etc sbin tmp # some other directories not installed by emacs
cat >etc/fstab <<EOF
/dev/ubd0 / ext2 defaults  0 1

cd /root
wget ''
tar xJf emacs-24.4.tar.xz

cd /root/emacs-24.4
./configure --without-x --prefix=/emacs
make install

# TODO: instructions to copy all of the shared libraries
#  mentioned in `ldd /emacs/bin/emacs` to /emacs/lib/emacs
cp /lib/terminfo/ /emacs/lib/terminfo 

cd /emacs
tar czf /emacs-24.4-built.tar.xz *

Get the file with

sudo docker cp <container name>:/emacs-24.4-built.tar.xz built/


FROM busybox:buildroot-2014.02

MAINTAINER owlowiscious
ADD built/emacs-24.4-built.tar.gz /emacs
RUN ["ln", "-s", "/emacs/lib/terminfo", "/lib/terminfo"]

# Add shell scripts that execute emacs' binaries with the required shared libraries.
ADD /usr/bin/
RUN for name in ctags ebrowse emacs emacs-24.4 emacsclient etags grep-changelog; do ln -s /usr/bin/ /usr/bin/$name || exit 1; done

CMD ["/usr/bin/emacs"]

Contents of

exec /emacs/lib/ --library-path /emacs/lib "/emacs/bin/$(basename -- "$0")"


Must enter C-p C-p twice because docker uses C-p to begin control sequences
such as C-p C-q (I think docker makes C-p C-q send C-c to the running process in the container). This is unfixable.

It is possible for users to run vi using busybox vi, which goes against the principles of EmacsOS. TODO: use a version of busybox without vi.

TODO: put this on Github.


"Busybox/GNU/Emacs OS" uses the wonderful open source projects of GNU/Emacs and Busybox, and was compiled using UBuntu distro's GNU/Linux utilities.

This was inspired by

Docker Pull Command