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 |
| 49 | ARG VERSION=3.28 |
| 50 | |
| 51 | COPY requirements_*.txt /opt/ |
| 52 | COPY jenkins-slave /usr/local/bin/jenkins-slave |
Benjamin Copeland | f7991f2 | 2020-07-30 14:01:21 +0100 | [diff] [blame] | 53 | COPY setup-sshd /usr/sbin/setup-sshd |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 54 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame^] | 55 | RUN set -e \ |
| 56 | && apt update -q=2 \ |
| 57 | && apt dist-upgrade -q=2 --yes \ |
| 58 | && apt install -q=2 --yes --no-install-recommends ${PKG_DEPS} \ |
| 59 | && curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash \ |
| 60 | && apt update -q=2 \ |
| 61 | && apt install -q=2 --yes --no-install-recommends git-lfs \ |
| 62 | && curl -s https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \ |
| 63 | && python2 /tmp/get-pip.py \ |
| 64 | && pip2 install --no-cache-dir -r /opt/requirements_python2.txt \ |
| 65 | && python3 /tmp/get-pip.py \ |
| 66 | && pip3 install --no-cache-dir -r /opt/requirements_python3.txt \ |
| 67 | && ln -s -f /usr/bin/python3 /usr/bin/python \ |
| 68 | && useradd -m -s /bin/bash buildslave \ |
| 69 | && echo "buildslave:$BUILDSLAVE_PASSWORD" | chpasswd \ |
| 70 | && echo 'buildslave ALL = NOPASSWD: ALL' > /etc/sudoers.d/jenkins \ |
| 71 | && chmod 0440 /etc/sudoers.d/jenkins \ |
| 72 | && mkdir -p /var/run/sshd /home/buildslave/tools \ |
| 73 | && wget -q http://github.com/danmar/cppcheck/releases/download/1.81/cppcheck-1.81.tar.gz -O /tmp/cppcheck.tar.gz \ |
| 74 | && tar -xf /tmp/cppcheck.tar.gz -C /opt \ |
| 75 | && (cd /opt/cppcheck-*; make CFGDIR=/opt/cppcheck-1.81/cfg; make install; make clean) \ |
| 76 | && curl --create-dirs -fsSLo ${PLANTUML_JAR_PATH} https://repo1.maven.org/maven2/net/sourceforge/plantuml/plantuml/1.2019.6/plantuml-1.2019.6.jar \ |
| 77 | && curl --create-dirs -fsSLo /usr/share/jenkins/slave.jar https://repo.jenkins-ci.org/public/org/jenkins-ci/main/remoting/${VERSION}/remoting-${VERSION}.jar \ |
| 78 | && 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 \ |
| 79 | && tar -xf /tmp/cmake-Linux-x86_64.tar.gz -C /home/buildslave/tools --strip-components=1 \ |
| 80 | && chmod 0755 /usr/share/jenkins \ |
| 81 | && chmod 0644 /usr/share/jenkins/slave.jar \ |
| 82 | && chmod 0755 /usr/local/bin/jenkins-slave \ |
| 83 | && chown -R buildslave:buildslave /home/buildslave/tools /usr/share/plantuml \ |
| 84 | && apt clean \ |
| 85 | && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
Benjamin Copeland | e277215 | 2020-06-17 11:54:56 +0100 | [diff] [blame] | 86 | |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 87 | ## Latest toolchains, available in $PATH. There can be newer versions of toolchains at |
| 88 | ## upstream projects but these are latest for the docker image |
| 89 | |
| 90 | ### Install GNU toolchain (arm-none-eabi) |
| 91 | ARG GNU_GCC_ARM_VERSION="7-2018-q2-update" |
| 92 | ARG GNU_GCC_ARM_TAR="gcc-arm-none-eabi-${GNU_GCC_ARM_VERSION}-linux.tar.bz2" |
| 93 | 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\ |
| 94 | ?revision=bc2c96c0-14b5-4bb4-9f18-bceb4050fee7?product=GNU%20Arm%20Embedded%20Toolchain%20Downloads,64-bit,,Linux,7-2018-q2-update' |
| 95 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame^] | 96 | RUN curl --create-dirs -fsSLo /tmp/${GNU_GCC_ARM_TAR} ${GNU_GCC_ARM_URL} \ |
| 97 | && tar -xf /tmp/${GNU_GCC_ARM_TAR} -C ${TOOLS_DIR} --strip-components=1 \ |
| 98 | && rm /tmp/${GNU_GCC_ARM_TAR} |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 99 | |
| 100 | ### Install GNU toolchain (aarch64-none-elf) |
| 101 | ARG GNU_GCC_AARCH64_VERSION="9.2-2019.12" |
| 102 | ARG GNU_GCC_AARCH64_TAR="gcc-arm-${GNU_GCC_AARCH64_VERSION}-x86_64-aarch64-none-elf.tar.xz" |
| 103 | ARG GNU_GCC_AARCH64_URL="https://developer.arm.com/-/media/Files/downloads/gnu-a/$GNU_GCC_AARCH64_VERSION/binrel/${GNU_GCC_AARCH64_TAR}" |
| 104 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame^] | 105 | RUN curl --create-dirs -fsSLo /tmp/${GNU_GCC_AARCH64_TAR} ${GNU_GCC_AARCH64_URL} \ |
| 106 | && tar -Jxf /tmp/${GNU_GCC_AARCH64_TAR} -C ${TOOLS_DIR} --strip-components=1 \ |
| 107 | && rm /tmp/${GNU_GCC_AARCH64_TAR} |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 108 | |
| 109 | ### Install Arm Clang (armclang) |
| 110 | ARG ARM_CLANG_VERSION="6.13" |
| 111 | ARG ARM_CLANG_TAR="DS500-BN-00026-r5p0-15rel0.tgz" |
| 112 | ARG ARM_CLANG_URL="https://developer.arm.com/-/media/Files/downloads/compiler/DS500-BN-00026-r5p0-15rel0.tgz\ |
| 113 | ?revision=6a961cf7-1d9a-4664-900b-11d20552dbc7?product=Download%20Arm%20Compiler,64-bit,,Linux,6.13" |
| 114 | ARG ARM_CLANG_INSTALL_DIR="${TOOLS_DIR}/armclang" |
| 115 | |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame^] | 116 | RUN curl --create-dirs -fsSLo /tmp/${ARM_CLANG_TAR} ${ARM_CLANG_URL} \ |
| 117 | && mkdir -p ${ARM_CLANG_INSTALL_DIR} \ |
| 118 | && tar -xzf /tmp/${ARM_CLANG_TAR} -C ${ARM_CLANG_INSTALL_DIR} \ |
| 119 | && ${ARM_CLANG_INSTALL_DIR}/install_x86_64.sh \ |
| 120 | --no-interactive \ |
| 121 | --i-agree-to-the-contained-eula \ |
| 122 | -d ${TOOLS_DIR} \ |
| 123 | && rm -rf ${ARM_CLANG_INSTALL_DIR} /tmp/${ARM_CLANG_TAR} |
Leonardo Sandoval | 7c2a7f4 | 2020-08-27 11:31:34 -0500 | [diff] [blame] | 124 | |
Leonardo Sandoval | e2c70a8 | 2020-10-15 13:50:08 -0500 | [diff] [blame] | 125 | ARG LINARO_VERSION=19.06 |
Leonardo Sandoval | 0460f54 | 2020-10-29 17:25:52 -0600 | [diff] [blame^] | 126 | RUN mkdir -p nfs/downloads/linaro/${LINARO_VERSION} \ |
| 127 | && cd nfs/downloads/linaro/${LINARO_VERSION} \ |
| 128 | && wget -q -c -m -A .zip -np -nd https://releases.linaro.org/members/arm/platforms/${LINARO_VERSION}/ \ |
| 129 | && for file in *.zip; do unzip -q ${file} -d $(basename ${file} .zip); done |
Leonardo Sandoval | e2c70a8 | 2020-10-15 13:50:08 -0500 | [diff] [blame] | 130 | |
Benjamin Copeland | f7991f2 | 2020-07-30 14:01:21 +0100 | [diff] [blame] | 131 | EXPOSE 22 |
| 132 | ENTRYPOINT ["/usr/sbin/setup-sshd"] |