-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 910 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 910 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
26
27
28
29
30
31
32
FROM python:3.11.13
ENV CHROME_BIN="/usr/bin/chromium"
ENV CHROMEDRIVER_PATH="/usr/bin/chromedriver"
ENV JAVA_HOME="/opt/java"
ENV PATH="${JAVA_HOME}/bin:${PATH}"
ENV BROWSERMOB_PATH="/browsermob-proxy/bin/browsermob-proxy"
RUN apt-get update && apt-get install -y \
wget curl unzip gnupg2 ca-certificates \
chromium-driver chromium && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /opt/java && \
wget -q https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u402-b06/OpenJDK8U-jre_x64_linux_hotspot_8u402b06.tar.gz -O /tmp/java.tar.gz && \
tar -xzf /tmp/java.tar.gz -C /opt/java --strip-components=1 && \
rm /tmp/java.tar.gz
RUN java -version
WORKDIR /browsermob-proxy
COPY browsermob-proxy/ .
WORKDIR /app
COPY app/requirements.txt .
RUN pip install -r requirements.txt
COPY app/ .
EXPOSE 8000
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]