snappy-java/docker/Dockerfile.centos5-linux-x8...

32 lines
1019 B
Docker
Raw Normal View History

2017-01-19 23:15:59 +01:00
FROM centos:5
MAINTAINER Taro L. Saito <leo@xerial.org>
RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
RUN sed -i 's|#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=http://vault.centos.org/5.11|' /etc/yum.repos.d/*.repo
RUN yum -y install make gcc gcc-c++ glibc-devel perl wget bzip2 curl cmake \
2017-01-19 23:15:59 +01:00
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /tmp/work \
&& cd /tmp/work \
&& wget http://www.netgull.com/gcc/releases/gcc-4.8.3/gcc-4.8.3.tar.gz \
&& tar xvfz gcc-4.8.3.tar.gz \
&& cd gcc-4.8.3 \
&& ./contrib/download_prerequisites \
&& cd .. \
&& mkdir objdir
RUN cd /tmp/work/objdir \
&& ../gcc-4.8.3/configure --prefix=/usr/local/gcc-4.8.3 CXXFLAGS=-fPIC CFLAGS=-fPIC --enable-languages=c,c++ \
2017-01-20 01:48:28 +01:00
&& make
RUN cd /tmp/work/objdir \
&& make install \
2017-01-19 23:15:59 +01:00
&& rm -rf /tmp/work
ENV PATH /usr/local/gcc-4.8.3/bin:$PATH
2017-01-20 01:48:28 +01:00
ENV LD_LIBRARY_PATH /usr/local/gcc-4.8.3/lib64/:$LD_LIBRARY_PATH
2017-01-19 23:15:59 +01:00
WORKDIR /work