diff options
| author | kj_sh604 | 2026-03-14 17:17:05 -0400 |
|---|---|---|
| committer | kj_sh604 | 2026-03-14 17:17:05 -0400 |
| commit | f7e1a920ef8f96450f152c468ca40dee35f68342 (patch) | |
| tree | 4242813a45695e215e0413e3c7a74f41094aa266 /Dockerfile | |
| parent | b54e2903e49fb82960a38820c1f0fa5f06376e51 (diff) | |
refactor: Dockerfile
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 25 |
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"] |
