18 lines
418 B
Docker
18 lines
418 B
Docker
|
|
FROM python:3.12-slim
|
||
|
|
|
||
|
|
WORKDIR /app
|
||
|
|
|
||
|
|
# Install dependencies
|
||
|
|
RUN pip install --no-cache-dir aiosqlite requests
|
||
|
|
|
||
|
|
# Copy the async service
|
||
|
|
COPY build/service/security_service_async.py /app/service.py
|
||
|
|
|
||
|
|
# Expose port
|
||
|
|
EXPOSE 1224
|
||
|
|
|
||
|
|
# Run with socat for network service
|
||
|
|
RUN apt-get update && apt-get install -y socat && rm -rf /var/lib/apt/lists/*
|
||
|
|
|
||
|
|
CMD socat TCP-LISTEN:1224,reuseaddr,fork SYSTEM:"python3 -u /app/service.py"
|