-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7c90e70
Showing
8 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM ubuntu:latest | ||
|
||
RUN apt-get update && apt-get -y install curl | ||
|
||
RUN mkdir -m 777 /usr/share/desktop-directories | ||
|
||
RUN curl -L https://github.com/ankitects/anki/releases/download/2.1.37/anki-2.1.37-linux.tar.bz2 > anki.tar.bz2 | ||
|
||
RUN tar xjf anki.tar.bz2 | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
tzdata \ | ||
locales \ | ||
xdg-utils \ | ||
ca-certificates \ | ||
build-essential \ | ||
mpv \ | ||
lame \ | ||
libnss3 \ | ||
python3-pyqt5 \ | ||
libxcb1 \ | ||
libxcb1-dev \ | ||
xcb \ | ||
python3-xcbgen \ | ||
qt5dxcb-plugin \ | ||
xserver-xorg-video-dummy \ | ||
mplayer locales materia-gtk-theme papirus-icon-theme dmz-cursor-theme | ||
|
||
ENV LANG=en_US.UTF-8 | ||
ENV DISPLAY=:0.0 | ||
ENV ANKICONNECT_BIND_ADDRESS=0.0.0.0 | ||
ENV ANKICONNECT_CORS_ORIGIN="*" | ||
|
||
RUN echo "Europe/Helsinki" > /etc/timezone && \ | ||
echo "LANG=en_US.UTF-8" >> /etc/environment && \ | ||
echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \ | ||
echo "LANGUAGE=en_US.UTF-8" >> /etc/environment && \ | ||
dpkg-reconfigure -f noninteractive tzdata && \ | ||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
echo 'LANG="en_US.UTF-8"'>/etc/default/locale && \ | ||
dpkg-reconfigure --frontend=noninteractive locales && \ | ||
update-locale LANG="en_US.UTF-8" | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
|
||
COPY xorg.conf /etc/X11 | ||
|
||
RUN cd anki-2.1.37-linux && sh install.sh | ||
|
||
COPY . . | ||
|
||
RUN bash tardown.bash | ||
|
||
RUN cp ./anki-connect-config.json /root/.local/share/Anki2/addons21/2055492159/config.json | ||
|
||
ENTRYPOINT ["./run.bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"apiKey": null, | ||
"apiLogPath": null, | ||
"webBindAddress": "0.0.0.0", | ||
"webBindPort": 8765, | ||
"webCorsOrigin": "*", | ||
"webCorsOriginList": ["*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
X& | ||
|
||
sleep 2 | ||
|
||
anki --no-sandbox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
LDIR=~/.local/share | ||
|
||
mkdir -p ${LDIR} | ||
tar zxvf Anki.tar.gz -C ${LDIR} | ||
tar zxvf Anki2.tar.gz -C ${LDIR} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
WANKI=$(pwd) | ||
|
||
pushd ~/.local/share | ||
tar -zcvf Anki.tar.gz Anki && mv Anki.tar.gz ${WANKI} | ||
tar -zcvf Anki2.tar.gz Anki2 && mv Anki2.tar.gz ${WANKI} | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Section "Device" | ||
Identifier "Configured Video Device" | ||
Driver "dummy" | ||
EndSection | ||
|
||
Section "Monitor" | ||
Identifier "Configured Monitor" | ||
HorizSync 31.5-48.5 | ||
VertRefresh 50-70 | ||
EndSection | ||
|
||
Section "Screen" | ||
Identifier "Default Screen" | ||
Monitor "Configured Monitor" | ||
Device "Configured Video Device" | ||
DefaultDepth 24 | ||
SubSection "Display" | ||
Depth 24 | ||
Modes "1024x800" | ||
EndSubSection | ||
EndSection |