FROM ubuntu:16.04 ARG BUILD_UID ENV DEBIAN_FRONTEND noninteractive ENV http_proxy http://proxy:3128/ ENV https_proxy http://proxy:3128/ ENV ftp_proxy http://proxy:3128/ VOLUME /scripts /artifacts /source /ccache /compiler RUN fgrep -q 'deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial' /etc/apt/sources.list || \ echo "deb-src http://ports.ubuntu.com/ubuntu-ports xenial main universe" >> /etc/apt/sources.list RUN for p in http https ftp; do echo Acquire::${p}::proxy '"http://proxy:3142";' ; done >> /etc/apt/apt.conf.d/proxy # install packages # openjdk-7-jre is for code analyizer scripts # openjdk-7-jdk libhawtjni-runtime-java required for mysql cluster build # protobuf-* google-mock for mysql-5.7 # libreadline-dev, libmecab-dev - for percona - ref: https://github.com/percona/percona-server/blob/5.7/build-ps/ubuntu/control # python-mysqldb tests # libgnutls-dev - mariadb-10.2 # FB MysqL: libgflags-dev RUN apt-get update && apt-get upgrade -y && apt-get -y build-dep mysql-server && \ apt-get install -y git automake autoconf libtool sudo libjemalloc-dev libjudy-dev libnuma-dev libssl-dev \ valgrind clang llvm-dev clang-tidy \ libboost-dev libsystemd-dev pkg-config libxml2-dev libcrack2-dev libkrb5-dev \ libncurses5-dev libpam0g-dev zlib1g-dev unzip libjson-perl git bash \ clang clang-tidy curl openjdk-8-jdk-headless cpio \ protobuf-compiler protobuf-c-compiler libprotobuf-dev \ libreadline-dev libmecab-dev python-mysqldb libsnappy-dev liblzma-dev \ software-properties-common ccache google-mock pbzip2 libgnutls-dev libgflags-dev libbz2-dev libaio-dev \ gdb # limit hit in parallel mysql worker processes # needs to be supported on host RUN sysctl fs.aio-max-nr=16777216 RUN useradd -m -u $BUILD_UID --home-dir /build build && chown build: /usr/local RUN curl --location --proxy proxy:3128 https://downloads.sourceforge.net/project/boost/boost/1.59.0/boost_1_59_0.tar.gz > /build/boost_1_59_0.tar.gz # MySQL-8.0 RUN curl --location --proxy proxy:3128 'https://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.gz' > /build/boost_1_63_0.tar.gz # staging # http://software.linux.ibm.com/pub/linuxpatch-staging/toolchain/at/ubuntu # development/prerelease # http://ausgsa.ibm.com/projects/p/ppctoolchain/web/public/at/ubuntu # Public releases: # ftp://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu # ppc64le only xlc compiler # http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ # fetch keys though squid rather than apt-cache-ng proxy # ppc64le only AT list RUN /bin/bash -c "if [[ `uname -p` == \"ppc64le\" ]]; then \ for CC in at10.0; do \ curl --proxy proxy:3128 http://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu/dists/utopic/6976a827.gpg.key | apt-key add -; \ echo 'deb http://ftp.unicamp.br/pub/linuxpatch/toolchain/at/ubuntu xenial '\${CC} >> /etc/apt/sources.list ; \ echo '#deb http://ausgsa.ibm.com/projects/p/ppctoolchain/web/public/at/ubuntu xenial '\${CC%-*} >> /etc/apt/sources.list; \ apt-get update ; apt-get install -y advance-toolchain-\${CC}-devel; \ done; \ curl --proxy proxy:3128 http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/public.gpg | apt-key add - && \ echo 'deb http://public.dhe.ibm.com/software/server/POWER/Linux/xl-compiler/eval/ppc64le/ubuntu/ utopic main' >> /etc/apt/sources.list && \ apt-get update && apt-get install -y xlc-license-community.13.1.5 xlc.13.1.5 && \ echo 1 | /opt/ibm/xlC/13.1.5/bin/xlc_configure ; \ fi" # handle gcc-X{.Y} test releases RUN env http_proxy=http://proxy:3128/ https_proxy=http://proxy:3128/ sudo -E add-apt-repository -y ppa:ubuntu-toolchain-r/test RUN echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main" >> /etc/apt/sources.list RUN curl --proxy proxy:3128 http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - RUN bash -c "for CC in gcc gcc-6; do \ apt-get update; \ apt-get install -y \"\${CC}\" \"\${CC/cc/++}\" || exit 1; \ done" RUN bash -c "if [[ `uname -p` == \"x86_64\" ]]; then \ for CC_VER in 3.9 4.0 ; do \ echo \"deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-\${CC_VER} main\" >> /etc/apt/sources.list; \ done; \ apt-get update; \ for CC in clang-3.9 clang-4.0 clang-5.0; do \ apt-get install -y \"\${CC}\" \"llvm-\${CC#clang-}\" || exit 1 ; \ done ; \ fi" WORKDIR /build # Run test # HOST_OS is a common.sh requirement - used to add proxy - doesn't matter too much CMD /usr/bin/sudo -E -H -u build CC=${CC} FLAVOUR=${FLAVOUR} FLAVOUR_BRANCH=${FLAVOUR_BRANCH} BUILD_TYPE=${BUILD_TYPE} HOST_OS=ubuntu-16.04 /scripts/build_mysql.sh