-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
47 lines (39 loc) · 1.24 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM python:3.10
WORKDIR /app
# Install required dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
unzip \
libnss3 \
libxss1 \
libasound2 \
fonts-liberation \
libappindicator3-1 \
libgbm-dev \
libgtk-3-0 \
libx11-xcb1 \
libxtst6 \
xdg-utils \
libglib2.0-0 \
libdrm2 \
libxrandr2 \
ca-certificates
# Download and install Chrome (specific version)
RUN wget -O /tmp/chrome-linux64.zip https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.69/linux64/chrome-linux64.zip && \
unzip /tmp/chrome-linux64.zip -d /opt/ && \
mv /opt/chrome-linux64 /opt/chrome && \
ln -sf /opt/chrome/chrome /usr/bin/google-chrome && \
chmod +x /usr/bin/google-chrome
# Set environment variables
ENV CHROME_BIN=/usr/bin/google-chrome
ENV CHROME_DRIVER_PATH=/usr/local/bin/chromedriver
ENV RUNNING_IN_DOCKER=true
# Copy requirements and install them
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY . .
# Expose the application port (if needed)
EXPOSE 8777
# Run the application
CMD ["uvicorn", "seerrbridge:app", "--host", "0.0.0.0", "--port", "8777"]