Error: Unable to find a match in docker-dr-elephant build - docker

I'm testing dr-elephant :
https://github.com/damienclaveau/docker-dr-elephant
But when i run :
docker build -t dr-elephant:2.0.6 .
I'm getting
Complete!
Last metadata expiration check: 0:00:19 ago on Thu Oct 24 07:51:21 2019.
No match for argument: krb5-auth-dialog
No match for argument: pam_krb5
Error: Unable to find a match
The command '/bin/sh -c yum install -y wget git unzip zip which && yum install -y krb5-server krb5-libs krb5-workstation && yum install -y krb5-auth-dialog pam_krb5 && yum install -y openssh-server openssh-clients && yum clean all' returned a non-zero code: 1
Any idea on how to fix this ?
Thanks

The error is right there: yum couldn't install packages named pam_krb5 and krb5-auth-dialog
You can easily test this by running the centos image and try to install those packages:
[root#228fcb9e4c19 /]# yum install -y krb5-auth-dialog pam_krb5
Failed to set locale, defaulting to C
CentOS-8 - AppStream 1.1 MB/s | 6.0 MB 00:05
CentOS-8 - Base 2.0 MB/s | 7.9 MB 00:03
CentOS-8 - Extras 634 B/s | 2.1 kB 00:03
No match for argument: krb5-auth-dialog
No match for argument: pam_krb5
Error: Unable to find a match
About how to fix this... you could try to remove that line (9 in the Dockerfile), but how do you know whether those packages were necessary by the app or not? So your best bet is to just contact the owner and tell him that his Dockerfile no longer works (it's 2 years old).
Usually this problem arises because the base image doesn't have a fixed version. You can check it's using FROM centos:latest, but today's centos is not the same as the centos of two years ago. You could also just try to edit the tag of the base image and use an older centos version, it might or might not work.

Related

Docker build fails with Error: Unable to find a match: e2fsprogs xfsprogs mdadm parted

Base image is
redhat ubi8/ubi
Step 5/10 : RUN yum install ca-certificates e2fsprogs xfsprogs util-linux mdadm parted lvm2 libudev-devel -y
---> Running in 792zfd35b185
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Red Hat Universal Base Image 8 (RPMs) - BaseOS 2.1 MB/s | 803 kB 00:00
Red Hat Universal Base Image 8 (RPMs) - AppStre 5.9 MB/s | 3.0 MB 00:00
Red Hat Universal Base Image 8 (RPMs) - CodeRea 120 kB/s | 18 kB 00:00
Package ca-certificates-2021.2.50-80.0.el8_4.noarch is already installed.
No match for argument: e2fsprogs
No match for argument: xfsprogs
Package util-linux-2.32.1-35.el8.x86_64 is already installed.
No match for argument: mdadm
No match for argument: parted
Error: Unable to find a match: e2fsprogs xfsprogs mdadm parted
The command '/bin/sh -c yum install ca-certificates e2fsprogs xfsprogs util-linux mdadm parted lvm2 libudev-devel -y' returned a non-zero code: 1
Docker file is below
#Docker file
FROM registry.access.redhat.com/ubi8/ubi
...
...
...
RUN yum install ca-certificates e2fsprogs xfsprogs util-linux nvme-cli mdadm parted lvm2 libudev-devel -y
How to resolve it. I have an active subscription on my host machine
Uninstalling Docker and installing Buildah worked

Installing docker-ce on Fedora 28

According to docker website, installation for Fedora should be as follow:
https://docs.docker.com/install/linux/docker-ce/fedora/#set-up-the-repository
However these instruction does not work for Fedora, and you get a frustrating message "Nothing to be done"
So how can I install Docker-ce on Fedora 28
From fedora 28 only the edge, test and nightly version are available.
To install docker-ce edge you can enable the edge repo:
dnf config-manager --set-disabled docker-ce-stable
dnf config-manager --set-enabled docker-ce-edge
dnf install docker-ce
At the writing of this answer, the repo of Docker did not contain a stable version for Fedora 28
The work around is to call:
sudo dnf install https://download.docker.com/linux/fedora/27/x86_64/stable/Packages/docker-ce-18.03.1.ce-1.fc27.x86_64.rpm
This will download the latest stable version at the writing of these lines.
Hope Docker will set a repo for Fedora 28 soon
I followed below steps on Fedora 28
Install DNF Plugins package
$ sudo dnf -y install dnf-plugins-core
--
Last metadata expiration check: 0:59:06 ago on Thu 05 Jul 2018 21:38:55 CDT.
Package dnf-plugins-core-2.1.5-4.fc28.noarch is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
Setup stable repository
$ sudo dnf config-manager \
--add-repo \
https://download.docker.com/linux/fedora/docker-ce.repo
--
Adding repo from: https://download.docker.com/linux/fedora/docker-ce.repo
Enable the edge and test repositories
$ sudo dnf config-manager --set-enabled docker-ce-edge
$ sudo dnf config-manager --set-enabled docker-ce-test
Install Docker CE
$ sudo dnf install docker-ce
....
Userid : "Docker Release (CE rpm) <docker#docker.com>"
Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35
From : https://download.docker.com/linux/fedora/gpg
Start docker
$ sudo systemctl start docker
Verify installation
$ sudo docker run hello-world
If all goes well you should get
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:3e1764d0f546ceac4565547df2ac4907fe46f007ea229fd7ef2718514bcec35d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
installation for Fedora should be as follow
Fedora 28: A basic, simple way of getting docker-ce ...
cd /etc/yum.repos.d/
# dnf install https://download.docker.com/linux/fedora/docker-ce.repo
# dnf install docker-ce
You get version "18.03.1.ce.el7.centos" , I.e. the 'Enterprise' version.
EDIT : Also see the answer from #Sagi Forbes.

docker Error with pre-create check: "We support Virtualbox starting with version 5

I'm trying to create docker machine host using the following command in fedora OS version 25.
docker-machine create -driver=virtualbox host01
I get below error while executing the command.
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is \"WARNING:
The vboxdrv kernel module is not loaded.
Either there is no module available for the current kernel (4.10.12-200.fc25.x86_64) or it failed to load.
Please try load the kernel module by executing as root
dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
You will not be able to start VMs until this problem is fixed.\\n5.1.26r117224\".
Please upgrade at https://www.virtualbox.org"
I have already virtualbox latest version installed. Running the command suggested by
sudo dnf install akmod-VirtualBox kernel-devel-4.10.12-200.fc25.x86_64 akmods --kernels 4.10.12-200.fc25.x86_64 && systemctl restart systemd-modules-load.service
I got the below error
Last metadata expiration check: 0:48:35 ago on Thu Aug 17 22:38:47 2017.
Package akmods-0.5.6-7.fc25.noarch is already installed, skipping.
No package --kernels available.
No package 4.10.12-200.fc25.x86_64 available.
Any suggestions?
I also had this problem and for this I upgrade Virtual box to 5.2 using following commands. This link help me
sudo apt-get remove virtualbox virtualbox-5.1
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list.d/virtualbox.list'
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.2
Hope this helps.
For windows users, in 2022 such problem still exists. So for those who use last build (now it is virtualBox-6.1.32-149290-Win), try to use version that starts with prefix 5. But not all '5' versions work. For example, for me worked only version 5.2.42 while versions: 5.2.18, 5.2.20, 5.2.44 didn't work
Helped for win 11 x64

docker on centos that has no internet, rpm package dependency issue

I am facing an issue installing docker-ce from package on a server that has no internet access.
This is the version of my Linux | centos-release-7-2.1511.el7.centos.2.10.x86_64
Virtualization: vmware
Operating system: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.el7.x86_64
Architecture: x86-64
Im trying to follow the instructions as set here however since the box doesnt have internet I can't do the yum install.
So I was doing it with rpm -ivh. So far im getting dependency errors after dependency errors.
I tried these 3 versions of docker and all of them are giving out a dependency errors.
-rw-r--r--. 1 root root 19521288 Nov 8 00:52 docker-ce-17.03.0.ce-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 19529520 Nov 8 00:02 docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 29108 Nov 8 00:53 docker-ce-selinux-17.03.0.ce-1.el7.centos.noarch.rpm
-rw-r--r--. 1 root root 29108 Nov 8 00:03 docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
-rw-r--r--. 1 root root 19509116 Nov 8 01:26 docker-engine-1.13.1-1.el7.centos.x86_64.rpm
-rw-r--r--. 1 root root 29024 Nov 8 01:26 docker-engine-selinux-1.13.1-1.el7.centos.noarch.rpm
rpm -ivh /docker/images/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
warning: /docker/images/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
error: Failed dependencies:
docker-ce-selinux >= 17.03.2.ce-1.el7.centos is needed by docker-ce-17.03.2.ce-1.el7.centos.x86_64
rpm -ivh /docker/images/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
warning: /docker/images/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
error: Failed dependencies:
selinux-policy-base >= 3.13.1-102 is needed by docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
selinux-policy-targeted >= 3.13.1-102 is needed by docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch
So I tried looking for that selinux package the I found on the site below:
I tried installing the rpm from rpmfindand unfortunately, its asking for another dependency.
rpm -ivh selinux-policy-minimum-3.13.1-102.el7.noarch.rpm
warning: selinux-policy-minimum-3.13.1-102.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
policycoreutils-python >= 2.5 is needed by selinux-policy-minimum-3.13.1-102.el7.noarch
selinux-policy = 3.13.1-102.el7 is needed by selinux-policy-minimum-3.13.1-102.el7.noarch
rpm -ivh selinux-policy-targeted-3.13.1-102.el7.noarch.rpm
warning: selinux-policy-targeted-3.13.1-102.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
policycoreutils >= 2.5 is needed by selinux-policy-targeted-3.13.1-102.el7.noarch
selinux-policy = 3.13.1-102.el7 is needed by selinux-policy-targeted-3.13.1-102.el7.noarch
Has anyone tried installing docker on this version of centos before that has no access to the internet?
Do you have any easier way of getting through this?
Thank you in advance!
On a machine with internet, download all dependencies:
mkdir -p offline_repo && cd offline_repo
curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
yum install --downloadonly --downloaddir=. docker-ce-*.rpm
You can do it on any machine (any OS) that have docker installed and internet access, you can download the dependencies within a container:
mkdir offline_repo
docker run --rm -it -v $PWD/offline_repo:/offline_repo centos:7.2.1511 \
sh -c 'cd /offline_repo \
&& curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm \
&& curl -O https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm \
&& yum install --downloadonly --downloaddir=. docker-ce-*.rpm'
Now you should have all required packages available in the offline_repo dir, which should look like this:
$ ls -1 offline_repo/
audit-libs-2.6.5-3.el7_3.1.x86_64.rpm
audit-libs-python-2.6.5-3.el7_3.1.x86_64.rpm
checkpolicy-2.5-4.el7.x86_64.rpm
docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
iptables-1.4.21-17.el7.x86_64.rpm
libcgroup-0.41-11.el7.x86_64.rpm
libmnl-1.0.3-7.el7.x86_64.rpm
libnetfilter_conntrack-1.0.6-1.el7_3.x86_64.rpm
libnfnetlink-1.0.1-4.el7.x86_64.rpm
libseccomp-2.3.1-2.el7.x86_64.rpm
libselinux-2.5-6.el7.x86_64.rpm
libselinux-python-2.5-6.el7.x86_64.rpm
libselinux-utils-2.5-6.el7.x86_64.rpm
libsemanage-2.5-5.1.el7_3.x86_64.rpm
libsemanage-python-2.5-5.1.el7_3.x86_64.rpm
libsepol-2.5-6.el7.x86_64.rpm
libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm
policycoreutils-2.5-11.el7_3.x86_64.rpm
policycoreutils-python-2.5-11.el7_3.x86_64.rpm
python-IPy-0.75-6.el7.noarch.rpm
selinux-policy-3.13.1-102.el7_3.16.noarch.rpm
selinux-policy-minimum-3.13.1-102.el7_3.16.noarch.rpm
selinux-policy-targeted-3.13.1-102.el7_3.16.noarch.rpm
setools-libs-3.3.8-1.1.el7.x86_64.rpm
systemd-219-30.el7_3.9.x86_64.rpm
systemd-libs-219-30.el7_3.9.x86_64.rpm
Then simply copy it to the offline machine, then install all packages:
cd offline_repo
yum install -y --cacheonly --disablerepo=* *.rpm

How to solve `Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o` while compiling qpid-cpp within Docker Alpine?

Qpid-cpp has been compiled in a Ubuntu docker image and the current size is 1.86GB:
REPOSITORY TAG IMAGE ID CREATED SIZE
ubuntu-qpid-cpp latest 7e60a5eabee1 44 hours ago 1.86 GB
Aim
To compile qpid-cpp within docker alpine to reduce the disk size of the image
Problem
Some packages that are available in Ubuntu are omitted or different in Alpine, e.g.:
ubuntu
RUN apt-get update -y && \
apt-get install -y wget && \
apt-get install -y build-essential python ruby && \
apt-get install -y cmake libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev
Attempt
In order to find the substitution packages the Dockerfile was built and when an error occurred the required package that is available in Alpine was added.
alpine
RUN apk update && \
apk add wget python ruby cmake build-base boost-dev util-linux-dev
Although most errors were solved, the following issue occurs while compile qpid-cpp within alpine:
[ 17%] Building CXX object
src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o
In file included from
/qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.h:31:0,
from /qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.cpp:22:
/usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect
#include <sys/errno.h> to <errno.h> [-Werror=cpp]
#warning redirecting incorrect #include <sys/errno.h> to <errno.h>
^~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/qpidcommon.dir/build.make:2727:
src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1494: src/CMakeFiles/qpidcommon.dir/all]
Error 2 make: *** [Makefile:161: all] Error 2
The command '/bin/sh -c cd qpid-cpp/bld/qpid-cpp-1.36.0 && make all && make
install' returned a non-zero code: 2
Question
How to solve the compilation issue Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o while compiling qpid-cpp within Docker Alpine?
I tried this with Ubuntu and Alpine docker images, and I get the same problem on Alpine. It appears that qpid won't build on Alpine Linux.
Be aware that the Ubuntu:16.04 image is 130 MB, 750 MB with dependencies installed. Compared to Alpine's 5 MB, and 476 MB with dependencies.
So those 1.86 GB are mostly made up of build dependencies and qpid itself. You won't be able to escape that with any other image. Maybe you could purge some of the build dependencies after building to decrease the final size.

Resources