Sign inSign up

grrdocker/centos_i686

By grrdocker

•Updated about 8 years ago

32-bit Centos image, for Travis CI

Image
0

3.2K

grrdocker/centos_i686 repository overview

We have Travis jobs that use Docker containers to build 32-bit debian and rpm client templates on every github commit. Since there aren't any official 32-bit Ubuntu or Centos images, we have to build our own Docker images and push them to dockerhub. Here's how we built this particular image:

  • Install the Community-Edition version of Docker (docker-ce, and not docker, or docker.io)

  • Create a new directory somewhere on your filesystem, e.g /tmp/dockerbuild

  • Become root ($ sudo su), and cd to the build directory.

  • Download the 32-bit Centos 7 release:

    wget http://mirror.centos.org/altarch/7/os/i386/Packages/centos-release-7-3.1611.el7.centos.i686.rpm
    
  • Unpack the release as follows:

    rpm -i centos-release-7-3.1611.el7.centos.i686.rpm --root $PWD/centos7_i686_chroot
    
  • Rebuild the rpm database for the Centos installation:

    rpm --root $PWD/centos7_i686_chroot --rebuilddb
    
  • Install all packages in the base package group; you will need to use the setarch tool to 'fake' a 32-bit architecture, since you will likely be running a 64-bit Linux host:

    linux32 yum --installroot=$PWD/centos7_i686_chroot -y groupinstall base
    
  • Build a gzipped tar archive of the installation directory:

    tar --create --gzip --file centos7_i686.tar.gz --directory centos7_i686_chroot .
    
  • Create a Docker image using the archive you have built:

    cat centos7_i686.tar.gz | docker import - centos_i686:7_base
    
  • Create a copy of this Docker file in the build directory: https://github.com/google/grr/blob/master/docker/Dockerfile.build_centos_i686⁠

  • Use the Docker file to build the final 32-bit image:

    docker build -t grrdocker/centos_i686:7 -t grrdocker/centos_i686:latest \
        -f Dockerfile.build_centos_i686 .
    
  • Log into Docker as grrdocker (or any account that is an owner in the grrdocker org): $ docker login

  • Push the image to dockerhub with both the '7' and 'latest' tags:

    docker push grrdocker/centos_i686:7 && \
        docker push grrdocker/centos_i686:latest
    

Tag summary

Content type

Image

Digest

Size

672.1 MB

Last updated

about 8 years ago

docker pull grrdocker/centos_i686