-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
43 lines (31 loc) · 1.03 KB
/
Containerfile
File metadata and controls
43 lines (31 loc) · 1.03 KB
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
FROM quay.io/redhatqe/selenium-standalone
# Add pip
USER root
RUN microdnf install -y python3 python3-pip git gcc zlib-devel bzip2-devel readline-devel sqlite-devel openssl-devel
# Setup pyenv
RUN git clone https://github.com/pyenv/pyenv.git $HOME/.pyenv
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
#RUN pip3 install --no-cache-dir --upgrade pip wheel
#RUN pip3 --version
ARG UNAME="robot"
ARG GNAME="robot"
ARG UHOME="/home/robot"
ARG HOST_UID=1000
ARG HOST_GID=1000
ARG SHELL="/bin/bash"
RUN groupadd -g ${HOST_GID} ${GNAME}
RUN useradd -u ${HOST_UID} -g ${HOST_GID} -ms ${SHELL} ${UNAME}
USER ${UNAME}
WORKDIR ${UHOME}
COPY app/ app/
COPY requirements.txt app/requirements.txt
ENV VIRTUAL_ENV=${UHOME}/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip3 install --no-cache-dir --upgrade robotframework robotframework-browser==16.2.0
RUN pip3 install --no-cache-dir -r app/requirements.txt
USER root
RUN chmod +x app/run_tests.sh
USER ${UNAME}
#ENTRYPOINT ["app/run_tests.sh"]