Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build an image based on the Dockerfile #446

Closed
stan-gray opened this issue Aug 16, 2023 · 8 comments
Closed

Cannot build an image based on the Dockerfile #446

stan-gray opened this issue Aug 16, 2023 · 8 comments

Comments

@stan-gray
Copy link

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

@qe360-vrucenzon
Copy link

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

@ppodgorsek
Copy link
Owner

ppodgorsek commented Aug 23, 2023

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.

@ichoosetoaccept
Copy link

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

@klaus0049
Copy link

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.

@rekcodocker
Copy link

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.

@rekcodocker
Copy link

rekcodocker commented Sep 1, 2023

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.

ppodgorsek added a commit that referenced this issue Sep 4, 2023
* Updated Firefox to version 117.0

* Updated Chromium to version 116.0

* Updated the AWS CLI to version 1.29.40
ppodgorsek added a commit that referenced this issue Sep 4, 2023
Issue #446 - Cannot build an image based on the Dockerfile
@ppodgorsek
Copy link
Owner

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.

@ppodgorsek
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants