Including entrypoint.sh to run xvfb to simulate an X Server.
This commit is contained in:
parent
d4e521b17d
commit
6bec4bb5b6
@ -1,12 +1,25 @@
|
|||||||
FROM txgio/anki
|
FROM txgio/anki
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y xvfb
|
||||||
|
USER anki-user
|
||||||
|
|
||||||
RUN mkdir -p /home/anki-user/Documents/Anki/addons
|
RUN mkdir -p /home/anki-user/Documents/Anki/addons
|
||||||
|
|
||||||
COPY AnkiConnect.py /home/anki-user/Documents/Anki/addons
|
COPY AnkiConnect.py /home/anki-user/Documents/Anki/addons
|
||||||
|
|
||||||
# Required if you want to access it from another IP address.
|
# Required if you want to access it from another IP address.
|
||||||
# RUN sed -i 's/127.0.0.1/0.0.0.0/' /home/anki-user/Documents/Anki/addons/AnkiConnect.py
|
RUN sed -i 's/127.0.0.1/0.0.0.0/' /home/anki-user/Documents/Anki/addons/AnkiConnect.py
|
||||||
|
|
||||||
COPY tests/prefs.db /home/anki-user/Documents/Anki/prefs.db
|
COPY tests/prefs.db /home/anki-user/Documents/Anki/prefs.db
|
||||||
|
|
||||||
|
ADD tests/entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
USER root
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
USER anki-user
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
CMD /bin/bash -c "(/usr/bin/ibus-daemon -xd; /usr/bin/anki;)"
|
CMD /bin/bash -c "(/usr/bin/ibus-daemon -xd; /usr/bin/anki;)"
|
8
tests/entrypoint.sh
Normal file
8
tests/entrypoint.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Start Xvfb
|
||||||
|
Xvfb -ac -screen scrn 1280x2000x24 :99.0 &
|
||||||
|
export DISPLAY=:99.0
|
||||||
|
|
||||||
|
exec "$@"
|
Loading…
Reference in New Issue
Block a user