CentOS 6 i386 Build
Docker hub doesn't publish 32-bit CentOS builds, so this sets up a Docker Automated Build to create our own.
To build the image, merely invoke docker as follows:
docker build .
Refreshing the tarball
To build the tarball that is referenced in the
Dockerfile we use Vagrant to build up a CentOS VM that can run through docker's
mkimage-yum steps. Here's how that's done:
vagrant up vagrant ssh cd /vagrant sudo ./make-docker-image.sh exit vagrant -f destroy
This will dump the tarball back in this directory where it can then be used to build the docker image as described above.
add this to install 32 bit packages:
RUN sed -i 's/\$arch/i686/g' /etc/yum.repos.d/
RUN sed -i 's/\$basearch/i386/g' /etc/yum.repos.d/
@zx1986 You have two options here:
RUN echo "i686" > /etc/yum/vars/arch && echo "i386" > /etc/yum/vars/basearchbefore the first
yum install(I have pushed a pull-request with this fix: https://github.com/toopher/toopher-docker/pull/1)
Prefix all your platform-dependent commands with
linux32 yum install ...
when I build whit this image,
I RUN yum install, and there will be install x86_64 package,