Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Python venv #36

Merged
merged 5 commits into from
Aug 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions ubuntu-base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /home
RUN CHROME_HEADLESS_DEPS="libglib2.0-0 libnss3 libdbus-1-3 libatk1.0-0 libatk-bridge2.0-0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libasound2"; \
TOOLS="unzip curl"; \
SELENIUM="default-jre-headless"; \
PYTHON="python3 python3-venv"; \
PYTHON="python3"; \
apt -y update \
&& apt -y install ${TOOLS} ${SELENIUM} ${PYTHON} ${CHROME_HEADLESS_DEPS} \
&& apt clean
Expand All @@ -24,20 +24,18 @@ RUN curl -fLo LATEST_RELEASE_STABLE https://googlechromelabs.github.io/chrome-fo
&& unzip "chromedriver.zip" \
&& ln -s "/home/chromedriver-${DOWNLOAD_ARCH}/chromedriver" /usr/local/bin \
&& rm "chromedriver.zip" \
&& rm LATEST_RELEASE_STABLE
&& rm LATEST_RELEASE_STABLE \
&& curl -fLo selenium-server.jar https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.9.0/selenium-server-4.9.0.jar

# Copy everything according .Dockerignore
COPY . .

RUN apt -y update \
RUN apt -y update \
&& apt -y install python3-pip \
&& python3 -m venv venv \
&& pip install --no-cache-dir -r requirements.txt \
&& apt -y purge python3-pip \
&& apt -y autopurge \
&& apt clean

RUN curl -fLo selenium-server.jar https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.9.0/selenium-server-4.9.0.jar \
&& apt clean \
&& java -jar selenium-server.jar standalone --version \
&& chromedriver --version \
&& chrome --headless --no-sandbox --disable-gpu --disable-gpu-sandbox --dump-dom https://www.chromestatus.com/ \
Expand Down
Loading