aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..5246b3a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
+FROM python:3.13-alpine AS builder
+
+RUN apk add --no-cache git make \
+ && git clone --depth=1 https://github.com/kj-sh604/mojicrypt /tmp/mojicrypt \
+ && make -C /tmp/mojicrypt install PREFIX=/usr/local
+
+
+FROM python:3.13-alpine
+
+RUN pip install --no-cache-dir pycryptodome
+
+COPY --from=builder /usr/local/bin/mojicrypt /usr/local/bin/mojicrypt
+
+WORKDIR /app
+
+COPY . .
+
+RUN mkdir -p /app/data \
+ && adduser -D appuser && chown -R appuser:appuser /app
+
+EXPOSE 5555
+
+USER appuser
+
+CMD ["python3", "server.py"]