blob: e398a8edf393bdf13240f83527c037340bce76ed [file] [log] [blame]
# Dockerfile to build a manylinux 2010 compliant cross-compiler.
#
# Builds a devtoolset gcc/libstdc++ that targets manylinux 2010 compatible
# glibc (2.12) and system libstdc++ (4.4).
#
# To build a new version, run:
# $ docker build -f Dockerfile.local-toolchain-ubuntu18.04-manylinux2010 \
# --tag "local-toolchain-ubuntu18.04-manylinux2010" .
FROM ubuntu:18.04 as local-toolchain-ubuntu18.04-manylinux2010
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
cpio \
file \
flex \
g++ \
make \
patch \
rpm2cpio \
unar \
wget \
xz-utils \
&& \
rm -rf /var/lib/apt/lists/*
ADD devtoolset/fixlinks.sh fixlinks.sh
ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
ADD devtoolset/rpm-patch.sh rpm-patch.sh
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
RUN /build_devtoolset.sh devtoolset-7 /dt7