oracle / container-images

Oracle Linux container images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oraclelinux:8-slim does not include yum

gadaro opened this issue · comments

Hi,
I've seen on oraclelinux-8-slim-rootfs.tar that yum package is not included anymore, ¿is this correct? Tested with this Dockerfile:

FROM oraclelinux:8-slim
RUN rpm -q yum

With this result:

Sending build context to Docker daemon 25.09kB Step 1/2 : FROM oraclelinux:8-slim ---> 73f821d86dfb Step 2/2 : RUN rpm -q yum ---> Running in 7168eeda66eb package yum is not installed The command '/bin/sh -c rpm -q yum' returned a non-zero code: 1

Thanks!

Yes, also dnf was removed. Obviously this happened within the last 48 hours.

While I understand the point (saves lots of space) this breaks things here in a way that they are extremely difficult to fix (because if you have been using dnf/yum for installing some software for creating your production images and suddenly cannot anymore this is an issue).

If this change was not pushed by mistake, I propose to provide a substitute, like 8-slim-dnf or so?

3 days ago, one commit ( a5399bf ), did the 19 Mar 2018, was approved. Why?

image

I guess that this old commit has made a huge back step on the images...

It's not a back step: dnf replaced yum on Oracle Linux 8 and we've switched to microdnf in the slim image to match the upstream UBI-slim variant.

@Djelibeybi agreed, microdnf is a good alternative. But the way you have implemented this change has lead to chaos:

  • It came as a total surprise to people who were already using oraclelinux:8-slim, actually was there a way to know it?
  • It broke builds, because with the same tag you have implemented a pretty drastic change.
  • To make things worse, since some of our Jenkins slaves already had the (old) version and some were pulling the new one during builds we got a complete mess here with seemingly randomly failing CI builds.

I appreciate the result, but this potentially cost your users time and caused frustration.

This issue still exists (just upgraded to a new maven image which is now based on oraclelinux8-slim and all of our dockerfiles broke due to lack of YUM.. >:-( I'll look into microdnf but that's really painful

This is not going to be fixed in the 8-slim image. If you need yum compatibility, use oraclelinux:8 instead. Otherwise, you'll need to pivot to microdnf. It's really not that painful. Assuming you're just doing a yum install, you just need to change that to microdnf install.

just upgraded to a new maven image which is now based on oraclelinux8-slim

I would raise this as an issue with whomever build the Maven image, because they should've warned folks about this change too.

I'll look into microdnf but that's really painful

Alternatively, add RUN microdnf install yum in your downstream Dockerfiles and you get yum back.

Note I went this last route (install yum with microdnf) and the yum it installs works "kindof" but is unable to find most of its packages. I had to do one kludge just to get it to run at all:
"touch /etc/yum/vars/ociregion"

...but after that it found wget and unzip and installed just fine but not the vast majority of the libs I actually need (starting with deltarpm)

"whomever" built the maven image is the "official" one so yeah.. I wish they'd fix their image but I don't have a lot of control over that.

The offiicial Maven image is sourced here: https://github.com/carlossg/docker-maven -- I would suggest opening an issue. But there are lots and lots of tags available too.