-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
42 lines (29 loc) · 850 Bytes
/
Dockerfile
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
ARG PYTHON_VERSION
FROM python:$PYTHON_VERSION-slim-buster
ARG ROBOT_VERSION
LABEL description="Robot Framework in a Python 3 slim-buster based Docker image"
ARG UNAME="robot"
ARG GNAME="robot"
ARG UHOME="/home/robot"
ARG HOST_UID=1000
ARG HOST_GID=1000
ARG SHELL="/bin/bash"
RUN addgroup --system \
--gid ${HOST_GID} \
${GNAME}
RUN adduser --system \
--uid ${HOST_UID} \
--ingroup ${GNAME} \
--disabled-password \
--home ${UHOME} \
--shell ${SHELL} \
${UNAME}
USER ${UNAME}
WORKDIR ${UHOME}
ENV VIRTUAL_ENV=${UHOME}/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip3 install --no-cache-dir --upgrade pip
RUN pip3 install --no-cache-dir robotframework==$ROBOT_VERSION
RUN pip3 install --no-cache-dir --upgrade RESTinstance
ENTRYPOINT ["python3", "-m", "robot.run", "--outputdir", "results"]