kumquat-buildroot/support/docker/Dockerfile

63 lines
1.8 KiB
Docker
Raw Normal View History

# This Dockerfile generates the docker image that gets used by Gitlab CI
# To build it (YYYYMMDD.HHMM is the current date and time in UTC):
# sudo docker build -t buildroot/base:YYYYMMDD.HHMM support/docker
# sudo docker push buildroot/base:YYYYMMDD.HHMM
# We use a specific tag for the base image *and* the corresponding date
# for the repository., so do not forget to update the apt-sources.list
# file that is shipped next to this Dockerfile.
FROM debian:stretch-20171210
LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \
vendor="Buildroot" \
description="Container with everything needed to run Buildroot"
# Setup environment
ENV DEBIAN_FRONTEND noninteractive
# This repository can be a bit slow at times. Don't panic...
COPY apt-sources.list /etc/apt/sources.list
# The container has no package lists, so need to update first
RUN dpkg --add-architecture i386 && \
apt-get update -y
RUN apt-get install -y --no-install-recommends \
bc \
build-essential \
bzr \
ca-certificates \
cmake \
cpio \
cvs \
file \
g++-multilib \
git \
libc6:i386 \
libncurses5-dev \
locales \
mercurial \
support/docker: use the distro-provided flake8 Currently, we install flake8 and its dependencies via pip. We tried to be reproducible by pinning the version of those python packages, but we did forget quite a few of them, and thus some dependencies for flake8 are installed as uncontrolled versions. Furthermore, before we install flake8 and its dependencies, we forcibly update pip, setuptools, and wheels packages to their latest versions. This explicitly breaks reproducibility. While we could enforce a specific version of all those packages and still grab them from PyPI, we can simply grab them from the distribution-provided packages instead. Since we're using a pinned version of stretch, this already guarantees we'll reproducibly get the same versions over and over again. Besides, we just need to list flake8 as a package to install to automatically get all its dependencies (again, in a reproducible way). This has the slight unfortunate drawback of downgrading flake8 to version 3.2.1, from version 3.5.0, as well as downgrading a few of flake8's dependencies, as noticed by Ricardo: http://lists.busybox.net/pipermail/buildroot/2018-May/222376.html However, as Ricardo said, there isn't "any serious limitation of this old version, the release notes for a version in the between mentions 'Dramatically improve the performance' but we have a limited number of scripts and running on Gitlab for all of them still takes less than 5 minutes". Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Acked-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-06-10 17:44:58 +02:00
python-flake8 \
python-nose2 \
python-pexpect \
qemu-system-arm \
qemu-system-x86 \
rsync \
subversion \
unzip \
wget \
&& \
apt-get -y autoremove && \
apt-get -y clean
# To be able to generate a toolchain with locales, enable one UTF-8 locale
RUN sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
/usr/sbin/locale-gen
RUN useradd -ms /bin/bash br-user && \
chown -R br-user:br-user /home/br-user
USER br-user
WORKDIR /home/br-user
ENV HOME /home/br-user
ENV LC_ALL en_US.UTF-8