FROM linaro/ci-#{ARCH}-tcwg-base-ubuntu:#{DISTRO}

RUN apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y \
 arcanist \
 apt-file \
 elpa-flycheck \
#if !ARCH_armhf
 emacs \
#else
# In Noble emacs fails to install for armhf.
#endif
 git-email \
 git-gui \
 git-svn \
 htop \
 iputils-ping \
 iputils-tracepath \
 ispell \
 less \
 mc \
 python3-git \
 screen \
 software-properties-common \
 stgit \
 tig \
 tmux \
 weechat \
 && apt-get clean \
 && rm -rf \
 /var/lib/apt/lists/* \
 /tmp/* \
 /var/tmp/*

RUN apt-file update

COPY run.sh start.sh /

#if ARCH_amd64 || ARCH_arm64
ENTRYPOINT ["/run.sh"]
#else
ENTRYPOINT ["linux32", "/run.sh"]
#endif
CMD ["start.sh"]
