-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (45 loc) · 1.52 KB
/
Dockerfile
File metadata and controls
53 lines (45 loc) · 1.52 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
44
45
46
47
48
49
50
51
52
53
# hadolint global ignore=DL3013,DL3018
FROM python:3.13-alpine3.23
ENV ROBOT_HOME=/opt/robot \
PYTHONPATH=/usr/local/lib/python3.13/site-packages/integration_library_builtIn \
IS_ANALYZER_RESULT_ENABLED=true \
IS_TAGS_RESOLVER_ENABLED=true \
STATUS_WRITING_ENABLED=false \
USER_ID=1000 \
GROUP_ID=1000
COPY scripts/docker-entrypoint.sh /
COPY scripts/*.py ${ROBOT_HOME}/
COPY requirements.txt ${ROBOT_HOME}/requirements.txt
COPY library ${ROBOT_HOME}/integration-tests-built-in-library
RUN \
# Install dependencies
apk add --update --no-cache \
bash \
shadow \
vim \
rsync \
ttyd \
build-base \
apk-tools \
ca-certificates \
# Clean up
&& rm -rf /var/cache/apk/*
RUN \
# Add an unprivileged user
groupadd -r robot --gid=${GROUP_ID} \
&& useradd -s /bin/bash -r -g robot --uid=${USER_ID} robot \
&& usermod -a -G 0 robot \
# Install dependencies
&& python3 -m pip install --no-cache-dir --upgrade \
pip \
setuptools \
&& python3 -m pip install --no-cache-dir -r ${ROBOT_HOME}/requirements.txt \
&& python3 -m pip install --no-cache-dir ${ROBOT_HOME}/integration-tests-built-in-library \
# Clean up
&& rm -rf ${ROBOT_HOME}/integration-tests-built-in-library \
# Set permissions
&& chmod +x /docker-entrypoint.sh \
&& chgrp 0 /docker-entrypoint.sh
WORKDIR ${ROBOT_HOME}
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["run-robot"]