• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Dockerfile to build a manylinux 2014/2014 compliant cross-compiler.
2#
3# Builds a devtoolset-7 environment with manylinux2014 compatible
4# glibc (2.12) and libstdc++ (4.4) in /dt7.
5#
6# Builds a devtoolset-9 environment with manylinux2014 compatible
7# glibc (2.17) and libstdc++ (4.8) in /dt9.
8#
9# To build a new version, run:
10# $ docker build -f Dockerfile.local-toolchain-ubuntu20.04-manylinux2014 \
11#  --tag "local-toolchain-ubuntu20.04-manylinux2014" .
12
13FROM ubuntu:20.04 as local-toolchain-ubuntu20.04-manylinux2014
14
15ENV DEBIAN_FRONTEND=noninteractive
16RUN apt-get update && apt-get install -y \
17      cpio \
18      file \
19      flex \
20      g++ \
21      make \
22      patch \
23      rpm2cpio \
24      unar \
25      wget \
26      xz-utils \
27      && \
28    rm -rf /var/lib/apt/lists/*
29
30ADD devtoolset/fixlinks.sh fixlinks.sh
31ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
32ADD devtoolset/rpm-patch.sh rpm-patch.sh
33
34# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
35RUN /build_devtoolset.sh devtoolset-7 /dt7
36# Set up a sysroot for glibc 2.17 / libstdc++ 4.8 / devtoolset-9 in /dt9.
37RUN /build_devtoolset.sh devtoolset-9 /dt9
38