I'm looking at manylinux1
stock image build scripts at https://github.com/pypa/manylinux, specifically the call chain:
.travis.yml
<...>
script:
- docker build --rm -t quay.io/pypa/manylinux1_$PLATFORM:$TRAVIS_COMMIT -f docker/Dockerfile-$PLATFORM docker/
docker/Dockerfile-<arch>
:
COPY build_scripts /build_scripts
RUN bash build_scripts/build.sh
docker/build_scripts/build.sh
:
<a bunch of variables>
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
<...>
The script assumes that a base CentOS 5 filesystem (e.g. /etc/yum
) is already present. Where does it come from?
I don't see any references to a stock image, or anything like downloading it from somewhere, or using an installation ISO. Neither is there an /etc
anywhere in the codebase.
Looking at the Dockerfile for the manylinux image, you can see that it is based on centos:5.11
FROM centos:5.11
MAINTAINER The ManyLinux project
...
The /etc/yum
folder is already part of the centos image, which can be verified by running: docker run -it centos:5.11 ls /etc/yum
Update:
Docker images are built in a layer structure defined inside a Dockerfile. Images build on top of each other, by using the FROM syntax inside a Dockerfile.
In this case, the image is based on centos:5.11
image. The syntax is explained at docker tag | Docker Documentation (go figure). In this case, there's no directory address, which means it's retrieved from centos
entry in the default Docker Hub registry, the one with the 5.11
tag.
The Dockerfile for CentOS is very simple. It just expands a tarball with the base CentOS file structure into a scratch
(empty) docker image. This tarball, centos-7-docker.tar.xz
in the case of the latest version, contains the /etc/yum
folder, among others.