-
Notifications
You must be signed in to change notification settings - Fork 201
/
Copy pathDockerfile
34 lines (27 loc) · 825 Bytes
/
Dockerfile
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
26
27
28
29
30
31
32
33
34
FROM debian:12-slim
# Set environment variables
ENV PORT=8080
ENV PYTHONUNBUFFERED=1
# Install system dependencies in a single layer to reduce image size
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-pillow \
python3-tornado \
python3-natsort \
--no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy the application code
COPY robohash/ /app/robohash/
COPY setup.py .
COPY README.md .
# Install the application in development mode
# Use the --break-system-packages flag since this is a controlled environment
RUN pip3 install -e . --break-system-packages
# Expose the port that the application will run on
EXPOSE 8080
# Command to run the application
CMD ["python3", "-m", "robohash.webfront"]