-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (18 loc) · 708 Bytes
/
Dockerfile
File metadata and controls
26 lines (18 loc) · 708 Bytes
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.12-slim
# Avoid interactive prompts during apt operations
ENV DEBIAN_FRONTEND=noninteractive
# Create work directory
WORKDIR /app
# Install system updates and any build tools only if needed later (kept minimal)
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency list and install
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY ask.py /app/ask.py
# Ensure the script is executable
RUN chmod +x /app/ask.py
# Default entrypoint executes the CLI; pass the question as args
ENTRYPOINT ["/usr/local/bin/python", "/app/ask.py"]