adtoolsBuilder/Dockerfile

76 lines
1.9 KiB
Docker

# The ubuntu:latest tag points to the "latest LTS", since that's the version recommended for general use.
FROM ubuntu:latest
LABEL maintainer="Georgios Sokianos <walkero@gmail.com>"
ARG DEBIAN_FRONTEND=noninteractive
ARG REPOS_PATH
WORKDIR /tmp
RUN dpkg --add-architecture i386 && apt-get update && apt-get -y --no-install-recommends install \
ca-certificates \
curl \
python2.7;
RUN ln -s /usr/bin/python2.7 /usr/bin/python; \
curl -fsSL https://bootstrap.pypa.io/pip/2.7/get-pip.py -o /tmp/get-pip.py && \
python get-pip.py && \
pip2 install --no-cache-dir argcomplete==1.12.3 mako; \
rm -rf /tmp/* /var/tmp/*;
RUN apt-get -y --no-install-recommends install \
autoconf \
automake \
autopoint \
bison \
dh-autoreconf \
flex \
g++-8 \
gettext \
git \
gperf \
libgmp-dev \
libmpc3 \
libmpc-dev \
libtool \
make \
mc \
nano \
patch \
rsync \
texinfo \
wget \
xz-utils; \
ln -s /usr/bin/g++-8 /usr/bin/g++; \
rm /usr/bin/gcc; \
ln -s /usr/bin/gcc-8 /usr/bin/gcc; \
git config --global user.email "walkero@gmail.com"; \
git config --global user.name "Georgios Sokianos";
# Install latest lha from git repo
RUN git clone https://github.com/jca02266/lha.git && \
mkdir build && \
cd lha && \
autoreconf -vfi && \
cd ../build && \
../lha/configure --prefix=/usr && \
make && \
make install && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*;
# Add necessary repos
ADD ${REPOS_PATH}/adtools /opt/adtools
ADD ${REPOS_PATH}/binutils-gdb /opt/adtools/binutils/repo
ADD ${REPOS_PATH}/coreutils /opt/adtools/coreutils/repo
ADD ${REPOS_PATH}/gnulib /opt/adtools/gnulib/repo
ADD build-gcc.sh /opt/adtools
ADD ${REPOS_PATH}/execsg_private_sdk /tmp/execsg_private_sdk
WORKDIR /opt/adtools
RUN git submodule init && \
git submodule update && \
chmod +x build-gcc.sh