I have been working on this project forever, every anomaly has been rectified, the only thing remaining appears to be a docker limitation but I'm still going to try my luck here, in case there's another way.
-> I've created a container for CentOS 7 and my instruction is to install a package from host using yum, so this is what I am doing:
docker exec <container-name> yum install -y <package-name>
This seems to work fine if we provide an initial to the package name, for convenience, let's say I am trying to install elinks, so:
docker exec <container-name> yum install -y elinks
This is working fine, however, if I provide the complete package name:
docker exec <container-name> yum install -y elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm
Or, ask a wildcard to do the trick for me:
docker exec <container-name> yum install -y elinks*
I get this error:
No package elinks-0.12-0.37.pre6.el7.0.1.x86_64.rpm available.
This is a hinderance to what I am working for while working on exceptions
Is there an easier way out of this? If I find anything before anyone else does, I'll make sure to post it here.
Thanks!
Feel free to comment for any additional information required, I've tested the same in a number of varied instances but the result is the same, seems like docker cannot handle complete package names.
Best Answer
Okay, I guess, I figured it out, apparently, docker was completing the package name along with its extension i.e. '.rpm'
And it appears like we cannot install a package using yum if we provide the extension along with package-name.
The solution was fairly simple, I had to create a shell script that would remove that additional ".rpm" from the package name and run it on the container, that did the trick for me.
I hope this information might be helpful. Thanks!