Skip to contentSkip to conversation

docker: dockerfile for openSUSE Leap

PATCH In review Dario Faggioli 3 participants 5 messages Nov 16, 2018 – Nov 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docker: dockerfile for openSUSE Leap

Dockerfile for building an openSUSE Leap container.

Tracks the latest release (at the time of writing this patch, it is Leap 15).

---
Cc: "Alex Bennée" <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: "Philippe Mathieu-Daudé" <[email protected]>

---
 tests/docker/dockerfiles/opensuse-leap.docker |   62 +++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 tests/docker/dockerfiles/opensuse-leap.docker
tests/docker/dockerfiles/opensuse-leap.docker new file +62 -0
new file mode 100644
index 0000000000..9d00861e66
@@ -0,0 +1,62 @@
+FROM opensuse/leap
+ENV PACKAGES \
+    bc \
+    bison \
+    bluez-devel \
+    brlapi-devel \
+    bzip2 \
+    flex \
+    gcc \
+    gcc-c++ \
+    gettext-tools \
+    git \
+    glib2-devel \
+    glusterfs-devel \
+    gtk3-devel \
+    gtkglext-devel \
+    gzip \
+    hostname \
+    libSDL2-devel \
+    libaio-devel \
+    libasan4 \
+    libcap-devel \
+    libcap-ng-devel \
+    libcurl-devel \
+    libfdt-devel \
+    libgcrypt-devel \
+    libgnutls-devel \
+    libjpeg62-devel \
+    libnettle-devel \
+    libnuma-devel \
+    libpixman-1-0-devel \
+    libpng16-devel \
+    librbd-devel \
+    libspice-server-devel \
+    libssh2-devel \
+    libtasn1-devel \
+    libxml2-devel \
+    lzo-devel \
+    make \
+    ncurses-devel \
+    perl \
+    pkg-config \
+    python3 \
+    python3-PyYAML \
+    snappy-devel \
+    sparse \
+    tar \
+    usbredir-devel \
+    virglrenderer-devel \
+    vte-devel \
+    which \
+    xen-devel
+    zlib-devel \
+ENV QEMU_CONFIGURE_OPTS --python=/usr/bin/python3
+
+ENV LANG en_US.UTF-8
+ENV LANGUAGE en_US:en
+ENV LC_ALL en_US.UTF-8
+
+RUN zypper ref && zypper up -y
+RUN zypper install -y $PACKAGES
+RUN rpm -q $PACKAGES | sort > /packages.txt
#1 lore raw
Quoted 23 lines · Dario Faggioli

Dockerfile for building an openSUSE Leap container.

Tracks the latest release (at the time of writing this patch, it is Leap 15).

---
Cc: "Alex Bennée" <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: "Philippe Mathieu-Daudé" <[email protected]>

---
 tests/docker/dockerfiles/opensuse-leap.docker |   62 +++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 tests/docker/dockerfiles/opensuse-leap.docker
tests/docker/dockerfiles/opensuse-leap.docker new file +2 -0
new file mode 100644
index 0000000000..9d00861e66
@@ -0,0 +1,62 @@
+FROM opensuse/leap
+ENV PACKAGES \

<snip>

tests/docker/dockerfiles/opensuse-leap.docker line 53

Quoted 7 lines
tests/docker/dockerfiles/opensuse-leap.docker new file +7 -0
+    tar \
+    usbredir-devel \
+    virglrenderer-devel \
+    vte-devel \
+    which \
+    xen-devel
+    zlib-devel \

This hasn't been tested because the docker image fails to build due to continuation breakage.

--
Alex Bennée

#2 lore raw
Quoted 36 lines · Alex Bennée
Quoted 25 lines · Dario Faggioli

Dockerfile for building an openSUSE Leap container.

Tracks the latest release (at the time of writing this patch, it is Leap 15).

---
Cc: "Alex Bennée" <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: "Philippe Mathieu-Daudé" <[email protected]>

---
 tests/docker/dockerfiles/opensuse-leap.docker |   62
+++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 tests/docker/dockerfiles/opensuse-leap.docker
tests/docker/dockerfiles/opensuse-leap.docker new file +2 -0
new file mode 100644
index 0000000000..9d00861e66
@@ -0,0 +1,62 @@
+FROM opensuse/leap
+ENV PACKAGES \

<snip>

tests/docker/dockerfiles/opensuse-leap.docker line 53

Quoted 7 lines
tests/docker/dockerfiles/opensuse-leap.docker new file +7 -0
+    tar \
+    usbredir-devel \
+    virglrenderer-devel \
+    vte-devel \
+    which \
+    xen-devel
+    zlib-devel \
Quoted 4 lines

This hasn't been tested because the docker image fails to build due to
continuation breakage.

It is indeed broken.

Basically, I tested it thoroughly, and I'm quite sure it works ok (although, I'm no docker expert).

Then, when I was about to send the mail, I saw in another commit that it was best to have the package list sorted; so I did that, and forgot to adjust the continuation. :-(

Sorry.

I'll send a v2 with this fixed.

Thanks and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/
#3 lore raw

Hi Dario,

Quoted 38 lines · Dario Faggioli
Quoted 36 lines · Alex Bennée
Quoted 25 lines · Dario Faggioli

Dockerfile for building an openSUSE Leap container.

Tracks the latest release (at the time of writing this patch, it is Leap 15).

---
Cc: "Alex Bennée" <[email protected]>
Cc: Fam Zheng <[email protected]>
Cc: "Philippe Mathieu-Daudé" <[email protected]>

---
 tests/docker/dockerfiles/opensuse-leap.docker |   62
+++++++++++++++++++++++++
 1 file changed, 62 insertions(+)
 create mode 100644 tests/docker/dockerfiles/opensuse-leap.docker
tests/docker/dockerfiles/opensuse-leap.docker new file +2 -0
new file mode 100644
index 0000000000..9d00861e66
@@ -0,0 +1,62 @@
+FROM opensuse/leap
+ENV PACKAGES \

<snip>

Quoted 7 lines
tests/docker/dockerfiles/opensuse-leap.docker new file +7 -0
+    tar \
+    usbredir-devel \
+    virglrenderer-devel \
+    vte-devel \
+    which \
+    xen-devel
+    zlib-devel \
Quoted 8 lines
Quoted 4 lines

This hasn't been tested because the docker image fails to build due to
continuation breakage.

It is indeed broken.

Basically, I tested it thoroughly, and I'm quite sure it works ok (although, I'm no docker expert).

I quickly fixed/tried it.
First this package list pulls many unuseful system packages. I added '--no-recommends' to reduce a bit:

RUN zypper ref && \
    zypper up -y && \
    zypper install -y --no-recommends $PACKAGES

This still install a bunch of unnecessary stuffs:

Creating group systemd-journal with gid 485.
Creating group systemd-network with gid 484.
Creating user systemd-network (systemd Network Management) with uid 484 and gid 484.
Creating group systemd-coredump with gid 483.
Creating user systemd-coredump (systemd Core Dumper) with uid 483 and gid 483. Creating group systemd-timesync with gid 482.
Creating user systemd-timesync (systemd Time Synchronization) with uid 482 and gid 482.
Failed to connect to bus: No such file or directory

Then the resulting image takes the same than without --no-recommends:
1.1GB. No idea why.
At some point some package tried to talk to the network manager via DBus to start sshd...

Second, while this works on x86_64, it fails on aarch64:

Problem: libcurl-devel-7.59.0-lp150.1.2.aarch64 requires libcurl4 = 7.59.0, but this requirement cannot be provided
not installable providers: libcurl4-7.59.0-lp150.1.2.aarch64[repo-oss]
Solution 1: downgrade of libcurl4-7.60.0-lp150.2.15.1.aarch64 to
libcurl4-7.59.0-lp150.1.2.aarch64
Solution 2: do not install libcurl-devel-7.59.0-lp150.1.2.aarch64 Solution 3: break libcurl-devel-7.59.0-lp150.1.2.aarch64 by ignoring
some of its dependencies

Not your fault. So I suppose you are planning to use this image to compile QEMU for openSUSE/x86_64 only, is this correct?

Regards,

Phil.

Quoted 16 lines

Then, when I was about to send the mail, I saw in another commit that it was best to have the package list sorted; so I did that, and forgot to adjust the continuation. :-(

Sorry.

I'll send a v2 with this fixed.

Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

#4 lore raw
Quoted 2 lines · Philippe Mathieu-Daudé

Hi Dario,

Hi,

Quoted 8 lines
Quoted 6 lines · Dario Faggioli
Quoted 5 lines · Alex Bennée

This hasn't been tested because the docker image fails to build due
to
continuation breakage.

Quoted 7 lines
Quoted 4 lines

It is indeed broken.

Basically, I tested it thoroughly, and I'm quite sure it works ok (although, I'm no docker expert).

I quickly fixed/tried it.

Cool, thanks for having a look. :-)

Quoted 7 lines

First this package list pulls many unuseful system packages. I added '--no-recommends' to reduce a bit:

RUN zypper ref && \
    zypper up -y && \
    zypper install -y --no-recommends $PACKAGES

Right, that makes sense. I'll add it.

Quoted 15 lines

This still install a bunch of unnecessary stuffs:

Creating group systemd-journal with gid 485.
Creating group systemd-network with gid 484.
Creating user systemd-network (systemd Network Management) with uid 484 and gid 484.
Creating group systemd-coredump with gid 483.
Creating user systemd-coredump (systemd Core Dumper) with uid 483 and gid 483.
Creating group systemd-timesync with gid 482.
Creating user systemd-timesync (systemd Time Synchronization) with uid
482 and gid 482.
Failed to connect to bus: No such file or directory

Quoted 3 lines

Then the resulting image takes the same than without --no-recommends:
1.1GB. No idea why.

So, my "model" was the fedora.docker dockerfile, where quite a few package are also installed, much more than the bare minimum necessary for a build to succeed (AFAICT, at least).

The idea would be to enable and include support for as many features/backends/integrations/etc as possible, in order to test them.

Basically, I did this by trial-and-error, i.e., adding packages related to entries in `./configure' which looked like 'no', and keeping them (only) if they turned such entry to 'yes'.

Now, this is what I see on my system, and that's why size did not concerned me: :-)

REPOSITORY   TAG             IMAGE ID       CREATED       SIZE
qemu         opensuse-leap   6bd6bc2ac139   4 hours ago   1.09GB
qemu         fedora          1b05e254d0d9   5 hours ago   2.02GB

If this is not ok, I'm happy to try to shrink the image size a bit (e.g., I'll double check if there are useless packages left in place), and/or to put together another dockerfile (something like opensuse- leap_minimal), with just what is necessary for the build (and the tests) to succeed.

Quoted 3 lines

At some point some package tried to talk to the network manager via DBus to start sshd...

Ah, interesting. :-P

So, from where did you see this (as well as the logs above) logs? Running `make docker-***' with 'V=1', I'm guessing?

Quoted 12 lines

Second, while this works on x86_64, it fails on aarch64:

Problem: libcurl-devel-7.59.0-lp150.1.2.aarch64 requires libcurl4 = 7.59.0, but this requirement cannot be provided
not installable providers: libcurl4-7.59.0-lp150.1.2.aarch64[repo-
oss]
Solution 1: downgrade of libcurl4-7.60.0-lp150.2.15.1.aarch64 to
libcurl4-7.59.0-lp150.1.2.aarch64
Solution 2: do not install libcurl-devel-7.59.0-lp150.1.2.aarch64 Solution 3: break libcurl-devel-7.59.0-lp150.1.2.aarch64 by ignoring
some of its dependencies

Ok, I see.

Quoted 3 lines

Not your fault. So I suppose you are planning to use this image to compile QEMU for openSUSE/x86_64 only, is this correct?

Yes, basically, x86_64 is my main usecase, and the (only) setup I can test quickly and easily enough. However, I'm certainly up for trying to improve this, and make this dockerfile useful for other arches as well.

I'll try to look into this. How did you test this on aarch64? On a native ARM host, or using QEMU?

Thanks again and Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/