blob: e51ceecc21e09ee3b6aecbdac9a9b433a9d3a7b1 [file] [log] [blame]
Benjamin Copelande2772152020-06-17 11:54:56 +01001FROM ubuntu:bionic
2
Leonardo Sandoval7c2a7f42020-08-27 11:31:34 -05003ENV ARMLMD_LICENSE_FILE=27000@ci.trustedfirmware.org
Benjamin Copelande2772152020-06-17 11:54:56 +01004ENV DEBIAN_FRONTEND=noninteractive
Fathi Boudra0a2e8002020-11-10 19:10:30 +01005ENV TOOLS_DIR=/home/buildslave/tools
6ENV PATH=${TOOLS_DIR}/bin:${PATH}
Benjamin Copelande2772152020-06-17 11:54:56 +01007ENV PLANTUML_JAR_PATH=/usr/share/plantuml/plantuml.jar
8ENV PKG_DEPS="\
Mate Toth-Pal4e6f1012020-07-07 10:13:07 +02009 bison \
Benjamin Copelande2772152020-06-17 11:54:56 +010010 build-essential \
Leonardo Sandoval23c34d12020-10-15 12:20:59 -050011 clang-tools-6.0 \
Benjamin Copelande2772152020-06-17 11:54:56 +010012 curl \
13 default-jre \
14 device-tree-compiler \
15 doxygen \
Karl Zhangedefe662020-09-15 18:12:19 +080016 exuberant-ctags \
Mate Toth-Pal4e6f1012020-07-07 10:13:07 +020017 flex \
Benjamin Copeland08f7e242020-06-30 13:38:41 +010018 g++-multilib \
19 gcc-multilib \
Benjamin Copelande2772152020-06-17 11:54:56 +010020 git \
21 graphviz \
22 jq \
Karl Zhangedefe662020-09-15 18:12:19 +080023 lcov \
Benjamin Copelande2772152020-06-17 11:54:56 +010024 libffi-dev \
25 libssl-dev \
Leonardo Sandoval04851952020-10-15 12:05:12 -050026 libxml-libxml-perl \
Benjamin Copelande2772152020-06-17 11:54:56 +010027 openjdk-8-jdk \
28 openssh-server \
29 perl \
30 python \
31 python-psutil \
32 python3 \
33 python3-crypto \
34 python3-dev \
35 python3-psutil \
36 python3-pyasn1 \
37 srecord \
38 sudo \
39 tree \
40 unzip \
41 virtualenv \
42 wget \
43 zip \
44"
45
46# Can be overriden at build time
47ARG BUILDSLAVE_PASSWORD=buildslave
Benjamin Copelande2772152020-06-17 11:54:56 +010048
49COPY requirements_*.txt /opt/
Fathi Boudra0a2e8002020-11-10 19:10:30 +010050COPY tf-*.install /tmp/
Benjamin Copelandf7991f22020-07-30 14:01:21 +010051COPY setup-sshd /usr/sbin/setup-sshd
Benjamin Copelande2772152020-06-17 11:54:56 +010052
Fathi Boudra0a2e8002020-11-10 19:10:30 +010053RUN set -e ;\
54 apt update -q=2 ;\
55 apt dist-upgrade -q=2 --yes ;\
56 apt install -q=2 --yes --no-install-recommends ${PKG_DEPS} ;\
57 curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash ;\
58 apt update -q=2 ;\
59 apt install -q=2 --yes --no-install-recommends git-lfs ;\
60 # Install Python requirements
61 curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py ;\
62 python2 /tmp/get-pip.py ;\
63 pip2 install --no-cache-dir -r /opt/requirements_python2.txt ;\
64 python3 /tmp/get-pip.py ;\
65 pip3 install --no-cache-dir -r /opt/requirements_python3.txt ;\
66 # Set Python 3 as default
67 ln -s -f /usr/bin/python3 /usr/bin/python ;\
68 # Setup buildslave user for Jenkins
69 useradd -m -s /bin/bash buildslave ;\
70 echo "buildslave:$BUILDSLAVE_PASSWORD" | chpasswd ;\
71 echo 'buildslave ALL = NOPASSWD: ALL' > /etc/sudoers.d/jenkins ;\
72 chmod 0440 /etc/sudoers.d/jenkins ;\
73 mkdir -p /var/run/sshd ${TOOLS_DIR} ;\
74 # Run shell script(s) to install files, toolchains, etc...
75 bash -ex /tmp/tf-dependencies.install ;\
76 # Fix permissions
77 chown -R buildslave:buildslave ${TOOLS_DIR} /usr/share/plantuml ;\
78 # Cleanup
79 apt clean ;\
80 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
Leonardo Sandoval7c2a7f42020-08-27 11:31:34 -050081
Benjamin Copelandf7991f22020-07-30 14:01:21 +010082EXPOSE 22
83ENTRYPOINT ["/usr/sbin/setup-sshd"]