diff mbox series

[4/4,v2] support/docker: add a Fedore-32 based image

Message ID 48c45cb866a160ce4cc05b03fdf15237eb346b66.1589751688.git.yann.morin.1998@free.fr
State New
Headers show
Series [1/4,v2] support/docker: rename the Dockerfile and its accompanying file | expand

Commit Message

Yann E. MORIN May 17, 2020, 9:41 p.m. UTC
Hopefully, this image is reproducible, since we are not using any update
repository, and from the looks of it, the repository of the release is
never touched.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

---
Changes v1 -> v2:
  - fix ordering of packages list  (Ricardo)
---
 support/docker/Dockerfile.fedora-32 | 48 +++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 support/docker/Dockerfile.fedora-32

Comments

Thomas Petazzoni May 18, 2020, 5:09 a.m. UTC | #1
Hello,

Thanks for doing this work, I did need some Docker images just
yesterday. One comment/question below.

On Sun, 17 May 2020 23:41:40 +0200
"Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> +# Remove the repository with updates, so we only
> +# get packages as they were at time of release.
> +RUN rm -f /etc/yum.repos.d/fedora-updates*.repo && \
> +    dnf -y install \
> +        @development-tools \
> +        bc \
> +        bzip2 \
> +        bzr \
> +        cpio \
> +        cvs \
> +        file \
> +        gcc-c++ \
> +        git \
> +        mercurial \
> +        ncurses-devel \
> +        perl-ExtUtils-MakeMaker \
> +        perl-Thread-Queue \
> +        python-nose2 \
> +        python-pexpect \
> +        qemu-system-arm \
> +        qemu-system-x86 \

With python-nose2 and python-pexpect, this pulls in a Python
interpreter, which is not strictly a requirement of Buildroot. I know
these are needed to run the runtime tests, and therefore to run the
Gitlab CI stuff. But sometimes we need to do some tests with really the
minimal set of Buildroot dependencies. Same goes with qemu-system-*
packages.

Should we have two sets of Docker images, one with the minimal set of
dependencies, and one that adds the stuff needed for Gitlab CI ? I
believe Docker allows to create some kind of layered "thing" where an
image sits on top of another.

Thomas
diff mbox series

Patch

diff --git a/support/docker/Dockerfile.fedora-32 b/support/docker/Dockerfile.fedora-32
new file mode 100644
index 0000000000..85e5c4ba9c
--- /dev/null
+++ b/support/docker/Dockerfile.fedora-32
@@ -0,0 +1,48 @@ 
+# vi: ft=dockerfile
+# Note: this dockerfile is not reproducible, because the repository
+# where we fetch packages from is not pinned to a specific point in
+# time; i.e. we'll get whatever is current at the moment we build.
+
+FROM fedora:32
+
+LABEL maintainer="Buildroot mailing list <buildroot@buildroot.org>" \
+      vendor="Buildroot" \
+      description="Container based on Fedora 32, with everything needed to run Buildroot already installed"
+
+# Remove the repository with updates, so we only
+# get packages as they were at time of release.
+RUN rm -f /etc/yum.repos.d/fedora-updates*.repo && \
+    dnf -y install \
+        @development-tools \
+        bc \
+        bzip2 \
+        bzr \
+        cpio \
+        cvs \
+        file \
+        gcc-c++ \
+        git \
+        mercurial \
+        ncurses-devel \
+        perl-ExtUtils-MakeMaker \
+        perl-Thread-Queue \
+        python-nose2 \
+        python-pexpect \
+        qemu-system-arm \
+        qemu-system-x86 \
+        rsync \
+        subversion \
+        unzip \
+        wget \
+        which \
+    && dnf -y clean all
+
+RUN useradd -ms /bin/bash br-user && \
+    chown -R br-user:br-user /home/br-user && \
+    printf 'br-user ALL=NOPASSWD: /usr/bin/su -\n' >/etc/sudoers.d/br-user && \
+    chmod 0440 /etc/sudoers.d/br-user
+
+USER br-user
+WORKDIR /home/br-user
+ENV HOME /home/br-user
+ENV LC_ALL C.utf8