ppodgorsek/docker-robot-framework

Cannot build an image based on the Dockerfile

Closed this issue · 8 comments

Describe the bug
I pulled the git repo and tried to build an image based on the Dockerfile, but it failed with /bin/sh: line 1: dnf: command not found

To Reproduce
Steps to reproduce the behavior:

  1. Pull the https://github.com/ppodgorsek/docker-robot-framework locally
  2. Navigate to docker-robot-framework directory
  3. execute - sudo docker build -t robotframework .
  4. See the error

Expected behavior
An image should be build

Screenshots

2023-08-16_13-39-46

Was able to build by setting FROM fedora:38 in the Dockerfile

That's a very surprising error, given that the logs show dnf was run successfully to upgrade the dependencies first, then it suddenly seems to disappear. I will try to reproduce that error on my side.

Same here. Does not work with FROM fedora:38 either. Need to say I'm on an M2 Mac, which is related to this: #443

I think the problem and a solution is described here:
containers/toolbox#1337
https://bugzilla.redhat.com/show_bug.cgi?id=2216807

I first inserted this line in my dockerfile and replaced all subsequent dnf with dnf5

# Install system dependencies
RUN dnf update -y --setopt=protected_packages=,
RUN dnf5 upgrade -y --refresh

However, the packages for chromedriver, chrome and firefox could not be found afterwards. But that is another problem.

Interesting: The dockerfile says "FROM fedora:39" but I can confirm: If you build it it as it is in the code today, it fails.
I will not try things with dnf5 because of the remark that chrome or the chromedriver or firefox can not be found.

No I have to backpaddle.

This is on Kubuntu Linux 23.04.

When I used FROM: fedora:38, the build fails:
Error: Unable to find a match: chromedriver-114.0* chromium-114.0* firefox-114.0*

When I run it with the original FROM fedora:38, the error is:

>>> Running post-transaction scriptlet: ca-certificates-0:2023.2.60_v7.0.306-2.f
>>> Stop post-transaction scriptlet: ca-certificates-0:2023.2.60_v7.0.306-2.fc39
>>> Running post-transaction scriptlet: rpm-0:4.18.92-3.fc40.x86_64
>>> Stop post-transaction scriptlet: rpm-0:4.18.92-3.fc40.x86_64
>>> Running trigger-post-uninstall scriptlet: glibc-common-0:2.38.9000-6.fc40.x8
>>> Stop trigger-post-uninstall scriptlet: glibc-common-0:2.38.9000-6.fc40.x86_6
>>> Running trigger-post-uninstall scriptlet: glib2-0:2.77.2-1.fc40.x86_64
>>> Stop trigger-post-uninstall scriptlet: glib2-0:2.77.2-1.fc40.x86_64
>>> Running trigger-post-uninstall scriptlet: glib2-0:2.77.2-1.fc40.x86_64
>>> Stop trigger-post-uninstall scriptlet: glib2-0:2.77.2-1.fc40.x86_64
>>> Running trigger-install scriptlet: glibc-common-0:2.38.9000-6.fc40.x86_64
>>> Stop trigger-install scriptlet: glibc-common-0:2.38.9000-6.fc40.x86_64
>>> Running trigger-install scriptlet: glib2-0:2.77.2-1.fc40.x86_64
>>> Stop trigger-install scriptlet: glib2-0:2.77.2-1.fc40.x86_64
/bin/sh: line 1: dnf: command not found
The command '/bin/sh -c dnf upgrade -y --refresh   && dnf install -y     chromedriver-${CHROMIUM_VERSION}*     chromium-${CHROMIUM_VERSION}*     firefox-${FIREFOX_VERSION}*     npm     nodejs     python3-pip     tzdata     xorg-x11-server-Xvfb-${XVFB_VERSION}*   && dnf clean all' returned a non-zero code: 127

Original error stands.
If you clone the repo and run docker-build, it does not build.

Sorry for the delay in solving this issue. Thank you all for your input, it made it easier for me to track down the problems.

As mentioned on RedHat's issue tracker, there was a bug in dnf which has now been resolved.

It is anyway surprising that the project was relying on a pre-release of Fedora rather than the latest stable one (I cannot remember the purpose of that), so I downgraded the base image to Fedora 38.
I also updated the versions of Firefox, Chromium and the AWS CLI library to allow building the image.

The latest image will be updated on the Docker Hub a bit later today.

The latest tag has now been updated on the Docker Hub, closing this issue.