From aae501313ef206b769b0204067cebd1604029fcd Mon Sep 17 00:00:00 2001 From: Hubert Farnsworth Date: Mon, 22 Apr 2019 14:09:10 +0000 Subject: [PATCH] Updated debian distro from jessie to stretch --- .circleci/config.yml | 4 +- Dockerfile | 103 +++++++++++++++++++++++++++++++++++++++ Dockerfile.in | 2 +- common.debian | 10 ++-- linux-ppc64le/Dockerfile | 3 -- linux-x86/Dockerfile | 2 - 6 files changed, 112 insertions(+), 12 deletions(-) create mode 100644 Dockerfile diff --git a/.circleci/config.yml b/.circleci/config.yml index 05e221d..242bc5f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,10 +11,10 @@ jobs: - run: name: base build command: | - docker pull debian:jessie + docker pull debian:stretch make base mkdir -p ~/docker - docker save -o ~/docker/base.tar debian:jessie dockcross/base:latest + docker save -o ~/docker/base.tar debian:stretch dockcross/base:latest - run: name: base test command: | diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f6de010 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,103 @@ +FROM debian:stretch-20190326-slim +MAINTAINER Matt McCormick "matt.mccormick@kitware.com" + +#include "common.debian" +# Image build scripts +COPY imagefiles/install-gosu-binary.sh /buildscripts/ + +ARG DEBIAN_FRONTEND=noninteractive +ARG REPO=http://cdn-fastly.deb.debian.org + +RUN \ + bash -c "echo \"deb $REPO/debian stretch main contrib non-free\" > /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian stretch-updates main contrib non-free\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian-security stretch/updates main\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb http://ftp.debian.org/debian stretch-backports main\" >> /etc/apt/sources.list" && \ + apt-get update --yes && \ + apt-get install --no-install-recommends --yes \ + automake \ + autogen \ + bash \ + build-essential \ + bc \ + bzip2 \ + ca-certificates \ + curl \ + dirmngr \ + file \ + gettext \ + gzip \ + gnupg \ + zip \ + make \ + ncurses-dev \ + pkg-config \ + libtool \ + python \ + python-pip \ + rsync \ + sed \ + ssh \ + bison \ + flex \ + tar \ + pax \ + vim \ + wget \ + xz-utils \ + zlib1g-dev \ + && \ + apt-get clean --yes && \ + /buildscripts/install-gosu-binary.sh && \ + rm -rf /buildscripts + +#include "common.docker" +WORKDIR /usr/src + +ARG GIT_VERSION=2.20.1 +ARG CMAKE_VERSION=3.13.2 + +# Image build scripts +COPY \ + imagefiles/build-and-install-cmake.sh \ + imagefiles/build-and-install-curl.sh \ + imagefiles/build-and-install-git.sh \ + imagefiles/build-and-install-ninja.sh \ + imagefiles/build-and-install-openssl.sh \ + imagefiles/build-and-install-openssh.sh \ + imagefiles/install-cmake-binary.sh \ + imagefiles/install-liquidprompt-binary.sh \ + imagefiles/install-python-packages.sh \ + imagefiles/utils.sh \ + /buildscripts/ + +RUN \ + X86_FLAG=$([ "$DEFAULT_DOCKCROSS_IMAGE" = "dockcross/manylinux-x86" ] && echo "-32" || echo "") && \ + /buildscripts/build-and-install-openssl.sh $X86_FLAG && \ + /buildscripts/build-and-install-openssh.sh && \ + /buildscripts/build-and-install-curl.sh && \ + /buildscripts/build-and-install-git.sh && \ + /buildscripts/install-cmake-binary.sh $X86_FLAG && \ + /buildscripts/install-liquidprompt-binary.sh && \ + PYTHON=$([ -e /opt/python/cp35-cp35m/bin/python ] && echo "/opt/python/cp35-cp35m/bin/python" || echo "python") && \ + /buildscripts/install-python-packages.sh -python ${PYTHON} && \ + /buildscripts/build-and-install-ninja.sh -python ${PYTHON} && \ + rm -rf /buildscripts + +RUN echo "root:root" | chpasswd +WORKDIR /work +ENTRYPOINT ["/dockcross/entrypoint.sh"] + +# Runtime scripts +COPY imagefiles/cmake.sh /usr/local/bin/cmake +COPY imagefiles/ccmake.sh /usr/local/bin/ccmake +COPY imagefiles/entrypoint.sh imagefiles/dockcross /dockcross/ + +# Build-time metadata as defined at http://label-schema.org +# Note: To avoid systematic rebuild of dependent images, only +# name and vcs-url are included. +ARG IMAGE +ARG VCS_URL +LABEL org.label-schema.name=$IMAGE \ + org.label-schema.vcs-url=$VCS_URL \ + org.label-schema.schema-version="1.0" diff --git a/Dockerfile.in b/Dockerfile.in index 8f5340c..2ae59c8 100644 --- a/Dockerfile.in +++ b/Dockerfile.in @@ -1,4 +1,4 @@ -FROM debian:jessie-20181112 +FROM debian:stretch-20190326-slim MAINTAINER Matt McCormick "matt.mccormick@kitware.com" #include "common.debian" diff --git a/common.debian b/common.debian index 0a7a7a2..40e3368 100644 --- a/common.debian +++ b/common.debian @@ -5,10 +5,10 @@ ARG DEBIAN_FRONTEND=noninteractive ARG REPO=http://cdn-fastly.deb.debian.org RUN \ - bash -c "echo \"deb $REPO/debian jessie main contrib non-free\" > /etc/apt/sources.list" && \ - bash -c "echo \"deb $REPO/debian jessie-updates main contrib non-free\" >> /etc/apt/sources.list" && \ - bash -c "echo \"deb $REPO/debian-security jessie/updates main\" >> /etc/apt/sources.list" && \ - bash -c "echo \"deb http://ftp.debian.org/debian jessie-backports main\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian stretch main contrib non-free\" > /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian stretch-updates main contrib non-free\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb $REPO/debian-security stretch/updates main\" >> /etc/apt/sources.list" && \ + bash -c "echo \"deb http://ftp.debian.org/debian stretch-backports main\" >> /etc/apt/sources.list" && \ apt-get update --yes && \ apt-get install --no-install-recommends --yes \ automake \ @@ -19,9 +19,11 @@ RUN \ bzip2 \ ca-certificates \ curl \ + dirmngr \ file \ gettext \ gzip \ + gnupg \ zip \ make \ ncurses-dev \ diff --git a/linux-ppc64le/Dockerfile b/linux-ppc64le/Dockerfile index eaa3d51..bb2cbd8 100644 --- a/linux-ppc64le/Dockerfile +++ b/linux-ppc64le/Dockerfile @@ -37,9 +37,6 @@ ENV AS=/usr/bin/${CROSS_TRIPLE}-as \ WORKDIR /work -# Note: Toolchain file support is currently in debian Experimental according to: -# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29 -# We can switch to that when it becomes stable. COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/ ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake diff --git a/linux-x86/Dockerfile b/linux-x86/Dockerfile index 8f01008..c2e500e 100644 --- a/linux-x86/Dockerfile +++ b/linux-x86/Dockerfile @@ -33,8 +33,6 @@ ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \ CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \ CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ -# Note: Toolchain file support is currently in debian Experimental: -# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29 COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/ ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake