Skip to content

Commit 773ccaa

Browse files
committed
Add Python Dockerfile, change workflow to build Python image
1 parent 2b363a1 commit 773ccaa

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.github/workflows/build-and-publish-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- name: Build and push image
4848
uses: docker/build-push-action@v3
4949
with:
50-
context: .
50+
context: ./Python.Dockerfile
5151
platforms: linux/amd64,linux/arm64
5252
push: true
5353
tags: ${{ steps.meta.outputs.tags }}

Python.Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.11.6-bookworm
2+
3+
ARG ANKI_VERSION="23.12"
4+
5+
EXPOSE 8080
6+
7+
ENV SYNC_USER1="anki:ikna"
8+
ENV SYNC_BASE="/data"
9+
ENV SYNC_HOST="0.0.0.0"
10+
ENV SYNC_PORT="8080"
11+
12+
VOLUME /data
13+
14+
WORKDIR /usr/src/anki-sync-server
15+
16+
RUN mkdir /data && \
17+
python3 -m venv syncserver && \
18+
syncserver/bin/pip install anki
19+
20+
ENTRYPOINT ["syncserver/bin/python", "-m", "anki.syncserver"]
File renamed without changes.

0 commit comments

Comments
 (0)