Git Product home page Git Product logo

docker-emacs's Introduction

Emacs Docker Image

Build Status GitHub release

Introduction

This image is based on Alpine Linux. The alpine image is so lite that it's size is less than 5MB. So I use this image as base.
This image contains these primary tools (except provided by alpine):

  • bash
  • git
  • curl
  • openssh-client
  • emacs
  • shadowsocks-libev (The Chinese buddies will need it ^o^)
  • proxychains-ng (A tool helps you use shadowsocks conveniently)

Build

Clone this repository to your disk. Go into the directory and run this command:

docker build -t jinwuzhao/emacs .

Usage

You need to mount your local workspace to path /mnt/share/Documents of container:

docker run -it --rm -v /path/to/workspace:/mnt/share/Documents jinwuzhao/emacs

If you need network proxy, use -p option:

docker run -it --rm -v /path/to/workspace:/mnt/share/Documents -v /path/to/config:/mnt/share/configs jinwuzhao/emacs -p

Note this command will copy sscfg.json from local config directory to the path /etc/shadowsocks/config.json of container and copy proxychains.conf to /etc/proxychains.conf. Then launch the ss-local(shadowsocks-libev client) with config sscfg.json and run emacs by proxychains4(proxychains-ng) with config proxychains.conf.
This repository contains sscfg.json and proxychains.conf sample. You can modify them as you need.
By default, the detach-keys of docker is ctrl+p,ctrl+q and it will conflicts with the move key of emacs. To solve this problem, you can modify the detach-keys to another value such as ctrl+^,ctrl+q before you create the container:

docker run -it --detach-keys 'ctrl-^,ctrl-q' --rm -v /path/to/workspace:/mnt/share/Documents jinwuzhao/emacs

Alternatively youd can modify the docker config file at ~/.docker/config.json:

{
	"detachKeys": "ctrl-^,ctrl-q"
}

If you work on Linux with X11 environment and want to share clipboards between host and container, you can mount the path /tmp/.X11-unix, set DISPLAY environment variable and install emacs package named xclip.el:

# launch container
docker run -it --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /path/to/workspace:/mnt/share/Documents jinwuzhao/emacs

# install xclip.el
M-x package-install RET xclip
M-x xclip-mode

You may add xclip-mode into .emacs file and commit a layer on this image.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.