-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathDockerfile.latest_release
More file actions
37 lines (28 loc) · 979 Bytes
/
Dockerfile.latest_release
File metadata and controls
37 lines (28 loc) · 979 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
33
34
35
36
37
FROM mcr.microsoft.com/playwright:v1.52.0-noble
# Update apt-get
USER root
RUN apt-get update
RUN python3 --version
RUN apt install -y python3-pip python3.12-venv
# 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
# 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
# Create venv and active it
RUN python3 -m venv /home/pwuser/.venv
ENV PATH="/home/pwuser/.venv/bin:$PATH"
# Upgrade pip and wheel for the user
RUN pip3 install --no-cache-dir --upgrade pip wheel uv
# Install RobotFramework and Browser library
RUN uv pip install --no-cache-dir --upgrade robotframework robotframework-browser==19.4.0
# Initialize Browser library without browsers binaries
RUN python3 -m Browser.entry init --skip-browsers