Alfred von Campe
2020-Mar-04 21:56 UTC
[CentOS] Running CentOS 6 in a Docker container on a non-CentOS host
I have to support a legacy build that runs on CentOS 6. I?m new to Docker and would like to use the official CentOS 6.10 image (https://github.com/CentOS/sig-cloud-instance-images/blob/da050e2fc6c28d8d72d8bf78c49537247b5ddf76/docker/Dockerfile <https://github.com/CentOS/sig-cloud-instance-images/blob/da050e2fc6c28d8d72d8bf78c49537247b5ddf76/docker/Dockerfile>) as a Docker container on another host (probably some flavor of Ubuntu), but can?t figure out how to tell Docker to find that image. I also need to make some specific customizations that I would like to distribute locally but not share with upstream. Can somebody point me to some HOWTOs or tutorials? Most Google searches return how to run Docker on CentOS, which is not what I?m after. Thanks, Alfred
Peter Kjellström
2020-Mar-05 11:05 UTC
[CentOS] Running CentOS 6 in a Docker container on a non-CentOS host
On Wed, 4 Mar 2020 16:56:02 -0500 Alfred von Campe <alfred at von-campe.com> wrote:> I have to support a legacy build that runs on CentOS 6. I?m new to > Docker and would like to use the official CentOS 6.10 image > (https://github.com/CentOS/sig-cloud-instance-images/blob/da050e2fc6c28d8d72d8bf78c49537247b5ddf76/docker/Dockerfile > <https://github.com/CentOS/sig-cloud-instance-images/blob/da050e2fc6c28d8d72d8bf78c49537247b5ddf76/docker/Dockerfile>) > as a Docker container on another host (probably some flavor of > Ubuntu), but can?t figure out how to tell Docker to find that image. > I also need to make some specific customizations that I would like to > distribute locally but not share with upstream. Can somebody point > me to some HOWTOs or tutorials? Most Google searches return how to > run Docker on CentOS, which is not what I?m after.You can use singularity. The following example makes an image by pulling from centos on dockerhub: singularity build c6.10.scif docker://centos:6.10 If you have an old binary, foo.x outside the container you can then: singularity exec ./c6.10.scif ./foo.x None of this requires root. More on singularity: https://sylabs.io/docs/ /Peter
Alfred von Campe
2020-Mar-09 20:16 UTC
[CentOS] Running CentOS 6 in a Docker container on a non-CentOS host
> On Mar 5, 2020, at 6:05, Peter Kjellstr?m wrote: > > You can use singularity. The following example makes an image by > pulling from centos on dockerhub:Interesting! However, I would prefer to use more ?native? Docker commands, as I would rather not have all developers install and configure Singularity when they already have Docker installed on their systems. There has got to be a way to configure Docker to grab an image from the official CentOS Docker repository (or whatever the correct terminology is for that). Thanks, Alfred