FROM centos:centos7.4.1708
LABEL maintainer="Kjell Enblom <kjell-e@lysator.liu.se>"

# Centos 7.4 with development tools and ct-ng (crosstool-ng).


RUN yum groupinstall -y "Development Tools"
RUN yum install -y which texinfo.x86_64 help2man.noarch ncurses.x86_64 ncurses-devel.x86_64 sudo glibc-static.x86_64 libstdc++-static.x86_64 gperf.x86_64

# ncurses-devel.x86_64 ncurses-libs.x86_64 ncurses-static.x86_64 ncurses-base.noarch ncurses-term.noarch 

RUN adduser crosstoolbuild

COPY files/ /build/crosstool-ng

RUN (cd /build/crosstool-ng; ./build-ct-ng.sh )

RUN rm -rf /build  # cleanup

# Add ct-ng to PATH
ENV PATH=/opt/crosstool-ng/1.23.0/bin:$PATH

# DONE
