Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add utils/docker with sample dockerfiles #249

Merged
merged 1 commit into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions utils/docker/Dockerfile.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# http://blog.csicar.de/docker/window-manger/2016/05/24/docker-wm.html

# Xephyr :1 -ac -br -screen 1024x768 -resizeable -reset
# Xephyr :1 -ac -br -screen 1024x768 -screen 1024x768 +xinerama +extension RANDR -resizeable -reset
# Xephyr :1 -ac -br -screen 1024x768 -screen 1024x768 +extension RANDR -resizeable -reset

# docker build -f ../Dockerfile.notion . -t notion && docker run --rm -it -e DISPLAY=:1 --name notion-test -v /tmp/.X11-unix:/tmp/.X11-unix notion
# docker build -f ../Dockerfile.notion . -t notion && docker run --rm -it -e DISPLAY=:1 --name notion-test -v /tmp/.X11-unix:/tmp/.X11-unix --entrypoint /bin/bash notion
# docker exec -it `docker ps --filter "name=notion-test" -q` /bin/bash

FROM ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive
RUN echo 'Acquire::http { Proxy "http://172.17.0.1:3142"; };' >> /etc/apt/apt.conf.d/01proxy
RUN apt update && apt install -y pkg-config build-essential groff

RUN apt update && apt install -y libx11-dev libxext-dev libsm-dev libxft-dev libxinerama-dev libxrandr-dev gettext x11-utils \
xterm x11-xserver-utils wget unzip xserver-xorg-video-dummy

# RUN apt update && apt install -y lua5.1 liblua5.1-dev
RUN apt update && apt install -y lua5.2 liblua5.2-dev
# RUN apt update && apt install -y lua5.3 liblua5.3-dev

# https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082
RUN apt update && apt install -y lua-posix \
&& ln -s /usr/lib/x86_64-linux-gnu/lua/5.2/posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so

# If lua-posix package is not available, use luarocks
# RUN wget https://luarocks.org/releases/luarocks-3.0.4.tar.gz \
# && tar zxpf luarocks-3.0.4.tar.gz \
# && cd luarocks-3.0.4 \
# && ./configure \
# && make build && make install
# RUN luarocks install luaposix

# Icon branch
# RUN apt update && apt install -y libcairo2-dev

RUN mkdir /notion
WORKDIR /notion
COPY . /notion/
RUN make
ENTRYPOINT ["/bin/bash"]
5 changes: 5 additions & 0 deletions utils/docker/Dockerfile.run
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM notion

ENV DISPLAY=${NOTION_TEST_DISPLAY:-:1.0}
RUN make install
ENTRYPOINT ["/usr/local/bin/notion"]
12 changes: 12 additions & 0 deletions utils/docker/docker-bash.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e

this_rel=$(dirname ${BASH_SOURCE[0]})
rel_root=$this_rel/../..

notion_root=$(realpath $rel_root)

docker build -f Dockerfile.make -t notion $notion_root
docker run --rm -it --name notion-test -v /tmp/.X11-unix:/tmp/.X11-unix notion

13 changes: 13 additions & 0 deletions utils/docker/docker-xephyr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -e

this_rel=$(dirname ${BASH_SOURCE[0]})
rel_root=$this_rel/../..

notion_root=$(realpath $rel_root)

docker build -f Dockerfile.make -t notion $notion_root
docker build -f Dockerfile.run -t notion-run $notion_root
docker run --rm -it --name notion-test -v /tmp/.X11-unix:/tmp/.X11-unix notion-run

1 change: 1 addition & 0 deletions utils/docker/start-xephyr.sh