Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 1 | FROM ubuntu:bionic |
| 2 | |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 3 | ARG TOOLS_DIR=/home/buildslave/tools |
| 4 | |
| 5 | ENV ARMLMD_LICENSE_FILE=27000@ci.trustedfirmware.org |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 6 | ENV DEBIAN_FRONTEND=noninteractive |
Riku Voipio | 7c8dbb0 | 2020-10-19 08:57:08 +0000 | [diff] [blame] | 7 | ENV PATH=$TOOLS_DIR/bin:${PATH} |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 8 | ENV PLANTUML_JAR_PATH=/usr/share/plantuml/plantuml.jar |
| 9 | ENV PKG_DEPS="\ |
Mate Toth-Pal | 4e6f101 | 2020-07-07 10:13:07 +0200 | [diff] [blame] | 10 | bison \ |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 11 | build-essential \ |
Leonardo Sandoval | 23c34d1 | 2020-10-15 12:20:59 -0500 | [diff] [blame] | 12 | clang-tools-6.0 \ |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 13 | curl \ |
| 14 | default-jre \ |
| 15 | device-tree-compiler \ |
| 16 | doxygen \ |
Karl Zhang | edefe66 | 2020-09-15 18:12:19 +0800 | [diff] [blame] | 17 | exuberant-ctags \ |
Mate Toth-Pal | 4e6f101 | 2020-07-07 10:13:07 +0200 | [diff] [blame] | 18 | flex \ |
Benjamin Copeland | 08f7e24 | 2020-06-30 13:38:41 +0100 | [diff] [blame] | 19 | g++-multilib \ |
| 20 | gcc-multilib \ |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 21 | git \ |
| 22 | graphviz \ |
| 23 | jq \ |
Karl Zhang | edefe66 | 2020-09-15 18:12:19 +0800 | [diff] [blame] | 24 | lcov \ |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 25 | libffi-dev \ |
| 26 | libssl-dev \ |
Leonardo Sandoval | 0485195 | 2020-10-15 12:05:12 -0500 | [diff] [blame] | 27 | libxml-libxml-perl \ |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 28 | openjdk-8-jdk \ |
| 29 | openssh-server \ |
| 30 | perl \ |
| 31 | python \ |
| 32 | python-psutil \ |
| 33 | python3 \ |
| 34 | python3-crypto \ |
| 35 | python3-dev \ |
| 36 | python3-psutil \ |
| 37 | python3-pyasn1 \ |
| 38 | srecord \ |
| 39 | sudo \ |
| 40 | tree \ |
| 41 | unzip \ |
| 42 | virtualenv \ |
| 43 | wget \ |
| 44 | zip \ |
| 45 | " |
| 46 | |
| 47 | # Can be overriden at build time |
| 48 | ARG BUILDSLAVE_PASSWORD=buildslave |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 49 | |
| 50 | COPY requirements_*.txt /opt/ |
Benjamin Copeland | f7991f2 | 2020-07-30 14:01:21 +0100 | [diff] [blame] | 51 | COPY setup-sshd /usr/sbin/setup-sshd |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 52 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame] | 53 | RUN 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 | && curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \ |
| 61 | && python2 /tmp/get-pip.py \ |
| 62 | && pip2 install --no-cache-dir -r /opt/requirements_python2.txt \ |
| 63 | && python3 /tmp/get-pip.py \ |
| 64 | && pip3 install --no-cache-dir -r /opt/requirements_python3.txt \ |
| 65 | && ln -s -f /usr/bin/python3 /usr/bin/python \ |
| 66 | && useradd -m -s /bin/bash buildslave \ |
| 67 | && echo "buildslave:$BUILDSLAVE_PASSWORD" | chpasswd \ |
| 68 | && echo 'buildslave ALL = NOPASSWD: ALL' > /etc/sudoers.d/jenkins \ |
| 69 | && chmod 0440 /etc/sudoers.d/jenkins \ |
| 70 | && mkdir -p /var/run/sshd /home/buildslave/tools \ |
| 71 | && wget -q http://github.com/danmar/cppcheck/releases/download/1.81/cppcheck-1.81.tar.gz -O /tmp/cppcheck.tar.gz \ |
| 72 | && tar -xf /tmp/cppcheck.tar.gz -C /opt \ |
| 73 | && (cd /opt/cppcheck-*; make CFGDIR=/opt/cppcheck-1.81/cfg; make install; make clean) \ |
| 74 | && curl --create-dirs -fsSLo ${PLANTUML_JAR_PATH} https://repo1.maven.org/maven2/net/sourceforge/plantuml/plantuml/1.2019.6/plantuml-1.2019.6.jar \ |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame] | 75 | && curl --create-dirs -fsSLo /tmp/cmake-Linux-x86_64.tar.gz https://cmake.org/files/v3.15/cmake-3.15.0-Linux-x86_64.tar.gz \ |
| 76 | && tar -xf /tmp/cmake-Linux-x86_64.tar.gz -C /home/buildslave/tools --strip-components=1 \ |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame] | 77 | && chown -R buildslave:buildslave /home/buildslave/tools /usr/share/plantuml \ |
| 78 | && apt clean \ |
| 79 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 80 | |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 81 | ## Latest toolchains, available in $PATH. There can be newer versions of toolchains at |
| 82 | ## upstream projects but these are latest for the docker image |
| 83 | |
| 84 | ### Install GNU toolchain (arm-none-eabi) |
| 85 | ARG GNU_GCC_ARM_VERSION="7-2018-q2-update" |
| 86 | ARG GNU_GCC_ARM_TAR="gcc-arm-none-eabi-${GNU_GCC_ARM_VERSION}-linux.tar.bz2" |
| 87 | ARG GNU_GCC_ARM_URL='https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2\ |
| 88 | ?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain%20Downloads,64-bit,,Linux,7-2018-q2-update' |
| 89 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame] | 90 | RUN curl --create-dirs -fsSLo /tmp/${GNU_GCC_ARM_TAR} ${GNU_GCC_ARM_URL} \ |
| 91 | && tar -xf /tmp/${GNU_GCC_ARM_TAR} -C ${TOOLS_DIR} --strip-components=1 \ |
| 92 | && rm /tmp/${GNU_GCC_ARM_TAR} |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 93 | |
| 94 | ### Install GNU toolchain (aarch64-none-elf) |
| 95 | ARG GNU_GCC_AARCH64_VERSION="9.2-2019.12" |
| 96 | ARG GNU_GCC_AARCH64_TAR="gcc-arm-${GNU_GCC_AARCH64_VERSION}-x86_64-aarch64-none-elf.tar.xz" |
| 97 | ARG GNU_GCC_AARCH64_URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/$GNU_GCC_AARCH64_VERSION/binrel/${GNU_GCC_AARCH64_TAR}" |
| 98 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame] | 99 | RUN curl --create-dirs -fsSLo /tmp/${GNU_GCC_AARCH64_TAR} ${GNU_GCC_AARCH64_URL} \ |
| 100 | && tar -Jxf /tmp/${GNU_GCC_AARCH64_TAR} -C ${TOOLS_DIR} --strip-components=1 \ |
| 101 | && rm /tmp/${GNU_GCC_AARCH64_TAR} |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 102 | |
| 103 | ### Install Arm Clang (armclang) |
| 104 | ARG ARM_CLANG_VERSION="6.13" |
| 105 | ARG ARM_CLANG_TAR="DS500-BN-00026-r5p0-15rel0.tgz" |
| 106 | ARG ARM_CLANG_URL="https://developer.arm.com/-/media/Files/downloads/compiler/DS500-BN-00026-r5p0-15rel0.tgz\ |
| 107 | ?revision=6a961cf7-1d9a-4664-900b-11d20552dbc7?product=Download%20Arm%20Compiler,64-bit,,Linux,6.13" |
| 108 | ARG ARM_CLANG_INSTALL_DIR="${TOOLS_DIR}/armclang" |
| 109 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame] | 110 | RUN curl --create-dirs -fsSLo /tmp/${ARM_CLANG_TAR} ${ARM_CLANG_URL} \ |
| 111 | && mkdir -p ${ARM_CLANG_INSTALL_DIR} \ |
| 112 | && tar -xzf /tmp/${ARM_CLANG_TAR} -C ${ARM_CLANG_INSTALL_DIR} \ |
| 113 | && ${ARM_CLANG_INSTALL_DIR}/install_x86_64.sh \ |
| 114 | --no-interactive \ |
| 115 | --i-agree-to-the-contained-eula \ |
| 116 | -d ${TOOLS_DIR} \ |
| 117 | && rm -rf ${ARM_CLANG_INSTALL_DIR} /tmp/${ARM_CLANG_TAR} |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 118 | |
Benjamin Copeland | f7991f2 | 2020-07-30 14:01:21 +0100 | [diff] [blame] | 119 | EXPOSE 22 |
| 120 | ENTRYPOINT ["/usr/sbin/setup-sshd"] |