Closed ppanero closed 5 years ago
As an alternative to #16 what about a simple technique of not using yum
but relying on rpm
directly?
$ docker run -i -t --rm centos:7 /bin/bash
[root@c76e0b166ac8 /]# rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/Packages/g/gnugo-3.8-18.el7.x86_64.rpm
[root@c76e0b166ac8 /]# gnugo --help
If you only need a couple of packages and their dependencies, then it should be quick to construct a list of URLs you need for their installation and avoid using yum
altogether. The EPEL URLs are pretty stable and pinning package versions may be considered an advantage.
If you need many packages with inter-connected dependencies, then this technique wouldn't be that great, although you could still use yum install <libraries>
in an empty centos:7
container and use rpm -qa
before and after to construct the list of your packages that to be installed via rpm -Uvh
.
It may not be the most elegant solution, but should be quick and works without any upstream changes :wink:
By changing the default python version from 2 to 3.6
yum
among other system tools stop working, since they need python2 to work. For example:I need
yum
& co to extend with some extra libraries that cannot be installed via pip, therefore I wanted to extend the image. For now my fix was to revert the default momentarily:However, I have to know which python version was setted in the Invenio image and hardcode it to fall back. It cannot be taken from the environment since
python3
has a symbolic link topython3.4
.Is there a more elegant solution? Thanks!