aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: 5246b3a1da7b79d54d04b1769f3e7d949ad8ba67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"]