summaryrefslogtreecommitdiffstats
path: root/support/docker
Commit message (Collapse)AuthorAgeFilesLines
* support/docker: use the distro-provided flake8Yann E. MORIN2018-06-171-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* support/docker: sort the list of installed packagesYann E. MORIN2018-06-171-6/+23
| | | | | | | | | | | | | | | As suggested in the docker best practices [0], order the package list alphabetically, and list only one package per line. This will be much usefull later, we need to update the list of installed packages, like adding new ones for example. [0] https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#sort-multi-line-arguments Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* support/docker: run apt-get update and apt-get install in two RUNsYann E. MORIN2018-06-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | In commit 7517aef4d (support/docker: limit the number of layers), we reduced the number of layers by coalescing multiple RUN commands into less commands. In doing so, we especially coalesced "apt-get update" with "apt-get install". However, the distribution we used is a pinned version of stretch, so we know that running apt-get update will always yield the same apt database. If we split the two apt-get commands, then we can re-use any local intermediate image when we need to update the list of packages to install; this helps quite a bit when testing the docker files over and over again, with just slight variants in the packages list. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Peter Korsgaard <peter@korsgaard.com> Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* support/dockerfile: install flake8Ricardo Martincoski2018-03-131-1/+10
| | | | | | | | | | | | | | | | | | | Use the latest version of the tool because it is actively maintained. But use a fixed version of the tool and its dependencies to get stable results. It can be manually bumped from time to time. Before installing any Python packages, ensure pip, setuptools, and wheel are up to date as recommended in the docs [1]. [1] https://packaging.python.org/tutorials/installing-packages/ Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Yann E. MORIN <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/dependencies: add check for c++ multilibGaël PORTAY2018-02-061-1/+1
| | | | | | | | | | | | Some packages build C++ 32bits host-tools and need the g++-multilib to be installed on the build machine. As example, qt5webengine builds a C++ host-tool when target is 32bits. Add the check for g++-multilib to the dependencies script; and update the Dockerfile to install g++-multilib package. Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* support/dockker: create and push tagged imagesYann E. MORIN2018-02-041-3/+3
| | | | | | | | | | | | | | Currently, we refer to the latest version of the image, which means we can't guarantee any reproducibility. Also, it measn we can't have a separate images for the maintenance branches (especially the LTS) and master. Update the comment in the Dockerfile to create and push tagged images. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/docker: use a fixed Debian snapshotYann E. MORIN2018-02-042-0/+11
| | | | | | | | | | | | | Since we're now using a specific base image tag, we need to also use a specific, stable repository to get additional packages from for this image. As such, use the Debian snapshot that matches the base image. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/docker: use a known base distributionYann E. MORIN2018-02-041-1/+1
| | | | | | | | | | | | | | | Currently, we are using debian:stable, which is subject to change with time, as new stable versions of Debian are released/updated. Use the latest tagged stable release, stretch-20171210 as of today, as the base distribution to use. This will ease reproducible builds in the future. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/docker: don't be silent when setting upYann E. MORIN2018-02-041-4/+4
| | | | | | | | | | | This image is not built very often, and when it is, it is important to see what's going on, so don't be silent when installing packages from the distro, and since that can take a bit of time it thus serves as progress report... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/docker: limit the number of layersYann E. MORIN2018-02-041-15/+15
| | | | | | | | | | | | | | | | | | The official documentation [0] suggests limiting the number of layers generated from a dockerfile. A layer is created for each RUN (and COPY and ADD) command. But we are only ever interested in the final image, so the intermediate layers are useless to us. Limit the number of RUN commands to limit the number of generated layers. [0] https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers Reported-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/dockerfile: add directives to run as non-rootYann E. MORIN2018-01-121-0/+7
| | | | | | | | | | | | | | | | | | | | Currently, our jobs on the gitlab-ci infra are running as root, which is problematic for two reasons: - this is not the usual way Buildroot is built; - it may miss issues where running as non-root is problematic. So, complement our Dockerfile with directives to add a new user and run everything as that user, as demonstrated by this build job: https://gitlab.com/ymorin/buildroot-ci/-/jobs/46929562 Additional, enforce an UTF-8 locale while running. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support: add Dockerfile for CIArnout Vandecappelle2017-07-021-0/+30
For Gitlab-CI, we want to avoid re-generating the minimal install to be able to run tests all the time. So let's create a docker image that we can post on Docker Hub and then pull. For the time being, this is just what we need for running our CI. Later we can produce something that is also useful for users. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud