Unverified Commit 1c128316 authored by Andy Stewart's avatar Andy Stewart Committed by GitHub
Browse files

Merge pull request #24 from lujun9972/master

对docker进行了一些小调整
parents 0601bf2b ebe1647a
Loading
Loading
Loading
Loading

docker/.emacs

deleted100644 → 0
+0 −2
Original line number Diff line number Diff line
(setq load-path (cons "/emacs-application-framework" load-path))
(require 'eaf)
+4 −4
Original line number Diff line number Diff line
FROM base/archlinux

RUN pacman -Syy && \
    pacman -S git nss emacs pkg-config dbus gcc make python python-pip  --noconfirm && \
    pacman -S git emacs  nss python python-pip python-dbus  --noconfirm && \
    yes|pacman -Scc 

RUN pip install --upgrade pip

RUN pip install PyMuPDF grip qrcode xlib pyqt5 dbus-python && rm -rf /root/.cache
RUN pip install PyMuPDF grip qrcode xlib pyqt5 && rm -rf /root/.cache

RUN git clone --depth=1 https://github.com/manateelazycat/emacs-application-framework

@@ -17,7 +17,7 @@ ENV LANG=zh_CN.UTF-8

USER eaf

COPY .emacs /home/eaf/
# COPY .emacs /home/eaf/


ENTRYPOINT ["emacs"]
 No newline at end of file
CMD ["emacs","-L","/emacs-application-framework","--eval","(require 'eaf)"]
+10 −2
Original line number Diff line number Diff line
@@ -4,12 +4,20 @@ If you prefer to run linux in a container, you can use below command to build an

### Build
```Shell
docker build -t eaf -f Dockerfile.arch .
docker build -t eaf  .
```

### Run
```Shell
xhost +local:root # WARN: this comes with security issues

docker run -e DISPLAY -e DBUS_SESSION_BUS_ADDRESS --rm -it -v /tmp/.X11-unix/:/tmp/.X11-unix -v /run/user/$(id -u)/:/run/user/1000/ -v ~/.Xauthority:/home/eaf/.Xauthority   eaf
docker run -e DISPLAY -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus --rm -it -v /tmp/.X11-unix/:/tmp/.X11-unix -v /run/user/$(id -u)/:/run/user/1000/ -v ~/.Xauthority:/home/eaf/.Xauthority   eaf
```
You can also reuse your own Emacs configuration in the container:

```Shell
xhost +local:root # WARN: this comes with security issues

# mount the Emacs configuration into the container
docker run -e DISPLAY -e DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus --rm -it -v /tmp/.X11-unix/:/tmp/.X11-unix -v /run/user/$(id -u)/:/run/user/1000/ -v ~/.Xauthority:/home/eaf/.Xauthority -v ~/.emacs.d:/home/eaf/.emacs.d  eaf
```