DMS/Dockerfile
2025-05-01 00:24:26 +08:00

36 lines
923 B
Docker

# Use the official Python image from the Docker Hub
FROM python:3.10-slim
# Install dependencies (Including SQLite libraries and timezone data)
RUN apt-get update && \
apt-get install -y \
iputils-ping \
curl \
apt-transport-https \
sqlite3 \
libsqlite3-dev \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Set the timezone environment variable
ENV TZ="Asia/Manila"
# Set the working directory in the container
WORKDIR /app
# Copy the requirements.txt file into the container
COPY requirements.txt .
# Install the dependencies
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application code into the container
COPY . .
# Expose port 1000 to the outside world
EXPOSE 1000
# Define the command to run your application (app.py as primary file)
CMD ["python", "app.py"]