emacs-portable
is a containerized version of Emacs, tailored for use with Distrobox. This project is particularly useful for immutable Linux distributions, and it has been tested on Fedora Silverblue Bluefin (projectbluefin.io). Based on Debian 12, it includes Emacs 29.1 with native compilation and the Lucid X toolkit for enhanced stability. The container also packs tools commonly used by various Emacs packages, like rg, fd, git, pandoc, and shellcheck, and has been specifically tested with Doom Emacs.
To build the emacs-portable
image:
-
Clone the repository:
git clone https://github.com/rafaelpalomar/emacs-portable.git cd emacs-portable
-
Build the container image:
podman build -t quay.io/rafael_palomar/emacs-portable:latest .
-
Optionally, push the image to Quay.io (requires authentication):
podman push quay.io/rafael_palomar/emacs-portable:latest
To use emacs-portable
with Distrobox:
-
Create a new Distrobox container:
distrobox create -i quay.io/rafael_palomar/emacs-portable:latest -n emacs-portable
-
Enter the Distrobox container:
distrobox enter emacs-portable
To install Doom Emacs inside your emacs-portable
container:
-
Clone the Doom Emacs project on the host:
git clone https://github.com/doomemacs/doomemacs.git
-
Enter the Distrobox container:
distrobox enter emacs-portable
-
Navigate to the Doom directory and run the installation script:
cd doomemacs ./bin/doom install
To export emacs-portable
as a .desktop
application:
-
Enter the Distrobox container:
distrobox enter emacs-portable
-
Export the Emacs application:
distrobox-export --app emacs
Inside the distrobox, you can enable an experimental systemd user service for Emacs:
-
Enter the Distrobox container:
distrobox enter emacs-portable
-
Enable and start the
emacs.service
:systemctl --user enable emacs.service systemctl --user start emacs.service
Subsequent uses of the distrobox will start the emacs server automatically.
To verify the signed container image:
-
Download the
cosign.pub
key from the repository. -
Run the following command to verify the signature:
cosign verify --key cosign.pub quay.io/rafael_palomar/emacs-portable:latest
Your contributions and feedback are welcome! Feel free to open issues or pull requests on GitHub.