-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kudos to mkorpela for fix
- Loading branch information
Showing
2 changed files
with
48 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,57 @@ | ||
FROM mcr.microsoft.com/playwright:v1.47.0-focal | ||
FROM mcr.microsoft.com/playwright:v1.48.0-focal | ||
|
||
# Add pip | ||
# Install Python 3.12 and set it up | ||
USER root | ||
RUN apt-get update | ||
USER root | ||
RUN apt-get install -y python3 python3-pip | ||
RUN apt-get install -y software-properties-common | ||
USER root | ||
RUN pip3 install --no-cache-dir --upgrade pip wheel | ||
RUN add-apt-repository ppa:deadsnakes/ppa | ||
USER root | ||
RUN rm -rf /var/lib/apt/lists/* | ||
RUN apt-get update | ||
USER root | ||
RUN apt-get install -y python3.12 | ||
USER root | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \ | ||
update-alternatives --set python3 /usr/bin/python3.12 | ||
|
||
# Install pip for Python 3.12 | ||
USER root | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py && \ | ||
rm get-pip.py | ||
|
||
# Upgrade pip and install wheel | ||
USER root | ||
RUN pip3 install --no-cache-dir --upgrade pip wheel && \ | ||
pip3 --version && \ | ||
python3 --version | ||
|
||
# Clean up | ||
USER root | ||
RUN apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Set environment variables | ||
ENV PATH="/home/pwuser/.local/bin:${PATH}" | ||
ENV NODE_PATH=/usr/lib/node_modules | ||
# What were these used for previously | ||
# RUN mv /root/.cache/ /home/pwuser/.cache | ||
# RUN chmod a+rwx -R /home/pwuser/.cache | ||
|
||
# Cache operations | ||
USER root | ||
RUN mv /root/.cache/ /home/pwuser/.cache || true | ||
RUN chmod a+rwx -R /home/pwuser/.cache || true | ||
|
||
# Switch to pwuser for the remaining operations | ||
USER pwuser | ||
RUN pip3 install --no-cache-dir --upgrade pip wheel | ||
USER pwuser | ||
RUN pip3 --version | ||
USER pwuser | ||
RUN pip3 install --no-cache-dir --user --upgrade robotframework robotframework-browser==18.9.0 | ||
USER pwuser | ||
RUN python3 -m Browser.entry init | ||
|
||
# Upgrade pip and wheel for the user | ||
RUN pip3 install --no-cache-dir --user --upgrade pip wheel | ||
|
||
# Print pip version | ||
RUN pip3 --version | ||
|
||
# Install RobotFramework and Browser library | ||
RUN pip3 install --no-cache-dir --user --upgrade robotframework robotframework-browser==18.9.0 | ||
|
||
# Initialize Browser library | ||
RUN python3 -m Browser.entry init |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.