I'm trying to install gcc-4.8 in ubuntu-20.04 docker image using below dockerfile.
# Pull base image.
FROM ubuntu:20.04
..............
...................
........................
## Get gcc 4.8.5 and build it
RUN wget http://mirror.keystealth.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.gz \
&& tar xzf gcc-4.8.5.tar.gz && \
cd gcc-4.8.5 && \
./contrib/download_prerequisites && \
cd .. && mkdir gccbuild && cd gccbuild && \
../gcc-4.8.5/configure \
--prefix="/opt/gcc" \
--enable-shared --with-system-zlib --enable-threads=posix \
--enable-__cxa_atexit --enable-checking --enable-gnu-indirect-function \
--enable-languages="c,c++" --disable-bootstrap \
&& make all && make install
When i build the image, it shows below error message.
--2022-03-03 10:52:56-- ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-2.4.2.tar.bz2
=> 'mpfr-2.4.2.tar.bz2'
Resolving gcc.gnu.org (gcc.gnu.org)... 8.43.85.97, 2620:52:3:1:0:246e:9693:128c
Connecting to gcc.gnu.org (gcc.gnu.org)|8.43.85.97|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/gcc/infrastructure ... done.
==> SIZE mpfr-2.4.2.tar.bz2 ... 1077886
==> PASV ... couldn't connect to 10.88.55.69 port 53847: Connection timed out
Retrying.
Since ftp access is blocked at firewall in our organization. Hence i do not have ftp site in dockerfile
to download gcc-4.8.5, I'm not sure from where it is trying to connect via ftp.
Can someone help me to install gcc-4.8 using dockerfile?