summaryrefslogtreecommitdiff
path: root/docker/anki-sync-server/Dockerfile
blob: a1204457f542d10b996b208f3971eaf764837ae8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Could not use Alpine due to wrong Python versions available.
# Well, disk space is cheap, nowadays!
FROM rockylinux/rockylinux

RUN dnf update -y
RUN dnf install -y python39 

ADD ./anki-sync-server/src /anki-sync-server
WORKDIR /anki-sync-server

RUN pip3.9 install -r /anki-sync-server/requirements.txt
RUN pip3.9 install -e /anki-sync-server
RUN sed -i 's|^data_root =.*|data_root = /data/collections|; s|^auth_db_path =.*|auth_db_path = /data/auth.db|; s|^session_db_path =.*|session_db_path = /data/session.db|' /anki-sync-server/ankisyncd.conf 

RUN adduser anki-sync-server
USER anki-sync-server

CMD ["python3.9", "-m", "ankisyncd"]