Files
eamco_authorize/Dockerfile.local
2026-01-05 08:43:54 -05:00

24 lines
615 B
Docker

FROM python:3.9
ENV PYTHONFAULTHANDLER=1
ENV PYTHONUNBUFFERED=1
ENV MODE="LOCAL"
WORKDIR /app
# Install Chrony (modern NTP implementation)
RUN apt-get update && apt-get install -y chrony
# Configure Chrony NTP servers
RUN echo "server time.nist.gov iburst" >> /etc/chrony/chrony.conf
RUN echo "server pool.ntp.org iburst" >> /etc/chrony/chrony.conf
# Copy and install Python dependencies
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# Copy source code
COPY . .
# Start Chrony service and then run the application
CMD chronyd -d && uvicorn app.main:app --host 0.0.0.0 --port 8000