Newer
Older
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
FROM harbor.elevenpaths.com/dockerhub-proxy/library/ubuntu:20.04
LABEL maintainer="Jorge Moratinos Salcines <jorge.moratinossalcines@telefonica.com>"
LABEL version="2.0"
LABEL description="Docker to run Robot Framework"
ENV ROBOT_DIRECTORY=/opt/robot-tests
ENV ROBOT_COMMON_DIRECTORY=$ROBOT_DIRECTORY/common
ENV ROBOT_TESTS_DIRECTORY=$ROBOT_DIRECTORY/tests
ENV ROBOT_RESULTS_DIRECTORY=$ROBOT_DIRECTORY/results
# Create directories structure
RUN mkdir $ROBOT_DIRECTORY
RUN mkdir $ROBOT_COMMON_DIRECTORY
RUN mkdir $ROBOT_TESTS_DIRECTORY
RUN mkdir $ROBOT_RESULTS_DIRECTORY
# Create Volumes for docker
# VOLUME $ROBOT_DIRECTORY
VOLUME $ROBOT_COMMON_DIRECTORY
VOLUME $ROBOT_TESTS_DIRECTORY
VOLUME $ROBOT_RESULTS_DIRECTORY
WORKDIR $ROBOT_DIRECTORY
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends \
software-properties-common \
build-essential \
bash \
bash-completion \
libxml2 \
libxslt-dev \
curl \
yarn \
less \
dpkg \
wget \
python3 \
python3-dev \
libxslt-dev \
libffi-dev \
python3-pip \
python3-venv \
python2.7-dev \
libssl-dev \
libldap2-dev libsasl2-dev ldap-utils slapd tox lcov valgrind\
tshark
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y --fix-missing python3.10 python3.10-venv python3.10-dev
RUN mkdir /opt/venv
RUN python3.10 -m venv /opt/venv
ADD basicRequirements.txt /root/
ADD basicRobotInstall.sh /root/
RUN chmod a+x /root/basicRobotInstall.sh \
&& /root/basicRobotInstall.sh /root/basicRequirements.txt
RUN sed -i 's/\/bin\/ash/\/bin\/bash/g' /etc/passwd
ADD entrypoint.sh /root/
ADD linter_entrypoint.sh /root/
ADD featdoc_entrypoint.sh /root/
ADD libdoc_entrypoint.sh /root/
RUN sed -i 's|ROBOT_DIRECTORY|'$ROBOT_DIRECTORY'|g' /root/entrypoint.sh
RUN sed -i 's|ROBOT_TESTS_DIRECTORY|'$ROBOT_TESTS_DIRECTORY'|g' /root/entrypoint.sh
RUN sed -i 's|ROBOT_COMMON_DIRECTORY|'$ROBOT_COMMON_DIRECTORY'|g' /root/entrypoint.sh
RUN sed -i 's|ROBOT_RESULTS_DIRECTORY|'$ROBOT_RESULTS_DIRECTORY'|g' /root/entrypoint.sh
RUN sed -i 's|ROBOT_DIRECTORY|'$ROBOT_DIRECTORY'|g' /root/linter_entrypoint.sh
RUN sed -i 's|ROBOT_TESTS_DIRECTORY|'$ROBOT_TESTS_DIRECTORY'|g' /root/linter_entrypoint.sh
RUN sed -i 's|ROBOT_COMMON_DIRECTORY|'$ROBOT_COMMON_DIRECTORY'|g' /root/linter_entrypoint.sh
RUN sed -i 's|ROBOT_DIRECTORY|'$ROBOT_DIRECTORY'|g' /root/featdoc_entrypoint.sh
RUN sed -i 's|ROBOT_TESTS_DIRECTORY|'$ROBOT_TESTS_DIRECTORY'|g' /root/featdoc_entrypoint.sh
RUN sed -i 's|ROBOT_COMMON_DIRECTORY|'$ROBOT_COMMON_DIRECTORY'|g' /root/featdoc_entrypoint.sh
RUN sed -i 's|ROBOT_DIRECTORY|'$ROBOT_DIRECTORY'|g' /root/libdoc_entrypoint.sh
RUN sed -i 's|ROBOT_TESTS_DIRECTORY|'$ROBOT_TESTS_DIRECTORY'|g' /root/libdoc_entrypoint.sh
RUN sed -i 's|ROBOT_COMMON_DIRECTORY|'$ROBOT_COMMON_DIRECTORY'|g' /root/libdoc_entrypoint.sh
RUN chmod a+x /root/entrypoint.sh
RUN chmod a+x /root/linter_entrypoint.sh
RUN chmod a+x /root/featdoc_entrypoint.sh
RUN chmod a+x /root/libdoc_entrypoint.sh
ENTRYPOINT [ "/root/entrypoint.sh" ]