BCDevOps/backup-container

Dockerfile build fails dnf: command not found

Closed this issue · 5 comments

STEP 13/17: RUN dnf install -y util-linux
/bin/sh: dnf: command not found
error: build error: building at STEP "RUN dnf install -y util-linux": while running runtime: exit status 127

Possibly related to this issue; #117. i.e. The base image is something other than the expected quay.io/fedora/postgresql-14:14 image.

If not, please provide the full log output of the build.

Pulling image artifacts.developer.gov.bc.ca/docker-remote/centos/postgresql-12-centos7:20200917-804ef01 ...
Trying to pull artifacts.developer.gov.bc.ca/docker-remote/centos/postgresql-12-centos7:20200917-804ef01...
Getting image source signatures
Copying blob sha256:0a2da22816aa7d806e488854fc96bc8214504ea29519a7b0a780fe296a205b92
Copying blob sha256:75f829a71a1c5277a7abf55495ac8d16759691d980bf1d931795e5eb68a294c0
Copying blob sha256:f1498894b11c4cf3596ed4a4a9adcabdf2ccdf89d725686a745de1723349c4dc
Copying blob sha256:15078beb608841a78a164bc6255be3fb93bc8471f7fdb546939cad477ec4d302
Copying blob sha256:e2c4942f4189d6ddddae502919a270d67c9609eaa06e5d83d7e8785de37d9778
Copying blob sha256:da56c96947230693d9acd81ef63cde7f7d1a7a351ba5fb36115a991f7b76d962
Copying blob sha256:c86f2f32b15e9de7a778fd0c92b4ba1f3b87f309899ae71df6ff6f4ac662d06c
Copying blob sha256:62bc88d7cb6a1c539f878da7a95020af677dfe7dc0503fb8de003eda8f17156f
Copying blob sha256:c016411b01b5d2d8b2337fadcb1df50f93fdf5c5667e9e89829d3cb908795d29
Copying config sha256:33e9a6e579d6c9f94ad13fecd2e6788f94792dd945d769b75678d906ad740316
Writing manifest to image destination
Storing signatures
Adding transient rw bind mount for /run/secrets/rhsm
STEP 1/17: FROM artifacts.developer.gov.bc.ca/docker-remote/centos/postgresql-12-centos7:20200917-804ef01
STEP 2/17: ENV TZ=PST8PDT
--> 8eb18b9fbf7
STEP 3/17: WORKDIR /
--> 269ab609dc3
STEP 4/17: COPY backup.* /
--> d4177d2db5f
STEP 5/17: ARG SOURCE_REPO=webdevops
--> 6e30c6ac2f9
STEP 6/17: ARG GOCROND_VERSION=23.2.0
--> e70f7c53038
STEP 7/17: ADD https://github.com/$SOURCE_REPO/go-crond/releases/download/$GOCROND_VERSION/go-crond.linux.amd64 /usr/bin/go-crond
--> 73d65edbd6f
STEP 8/17: USER root
--> 9dbe6d8a0a6
STEP 9/17: RUN curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/bin/mc
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 12 25.6M 12 3376k 0 0 2042k 0 0:00:12 0:00:01 0:00:11 2042k 70 25.6M 70 18.0M 0 0 7045k 0 0:00:03 0:00:02 0:00:01 7043k100 25.6M 100 25.6M 0 0 8338k 0 0:00:03 0:00:03 --:--:-- 8340k
--> 4104777f9f7
STEP 10/17: RUN chmod +x /usr/bin/mc
--> 97d308d6c48
STEP 11/17: RUN chmod +x /usr/bin/go-crond
--> 3e6ebf9b32c
STEP 12/17: RUN echo $TZ > /etc/timezone
--> 0f4eb7ebb1e
STEP 13/17: RUN dnf install -y util-linux
/bin/sh: dnf: command not found
error: build error: building at STEP "RUN dnf install -y util-linux": while running runtime: exit status 127

Yes, that's the problem. Your build is using centos/postgresql-12-centos7:20200917-804ef01 as the base image, rather than quay.io/fedora/postgresql-14:14 expected by the Dockerfile.

Have a look at the changes made in the PR related to issue #117; PR #118

That's it. Thank you.