Sign inSign up

cjimti/emacs

By cjimti

Updated over 8 years ago

Container-as-command: Emacs

Image
1

3.0K

cjimti/emacs repository overview

Docker Container Image Size Docker Container Layers Docker Container Pulls

Background

see: https://mk.imti.co/dont-install-emacs/

Container-as-command: Emacs

I use this for servers with Docker but no emacs. The container works best and is most transparent when it mounts the user's home directory. Mounting a home directory requires a lot of trust in the container. So who am I? You probably want to build your container and lose the need to trust me on this one; it's up to you. Clone or fork github.com/cjimti/cmd-emacs, if you would like to create your own. You can also easily cut-and-paste the Dockerfile into your own.

See the Build Container section below to make your own.

Install / Run Emacs

Installing the container-as-command emacs is simply creating an alias by adding this line to your .bash_profile or .bashrc:

alias emacs='docker run --rm -it -v "$PWD":/src -v "$HOME":/root cjimti/emacs'

Open a new terminal and run:

alias emacs

Run emacs:

emacs

The files in your current directory mount to the path /src in the container.

Open a file in the new emacs/docker command:

emacs ./somefile.yml

Debug

docker run --rm -it -v "$(pwd)":/src --entrypoint sh cjimti/emacs

Build Container

Change cjimti to your own Docker Hub username if you intend to push the container.

Build:
docker build -t cjimti/emacs .
Push:
docker push cjimti/emacs

Tag summary

Content type

Image

Digest

Size

47.1 MB

Last updated

over 8 years ago

docker pull cjimti/emacs