Sign inSign up

grrdocker/ubuntu_i386

By grrdocker

•Updated about 9 years ago

32-bit Ubuntu image, for Travis CI

Image
1

3.4K

grrdocker/ubuntu_i386 repository overview

We have Travis jobs that use Docker containers to build 32-bit debian and rpm client templates on every github commit (https://www.github.com/google/grr⁠). 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.

  • Unpack a 32-bit Ubuntu xenial release inside the build directory as follows:

    debootstrap --arch=i386 --foreign xenial xenial_i386_chroot
    
  • chroot into the installation directory: $ chroot xenial_i386_chroot

  • Finish the bootstrapping process in the chroot jail: $ /debootstrap/debootstrap --second-stage

  • exit the jail

  • The Ubuntu installation will have an empty sources.list file. Fix that by copying the file used by the official 64-bit xenial image:

    docker run --rm ubuntu:xenial \
        cat /etc/apt/sources.list > xenial_i386_chroot/etc/apt/sources.list
    
  • Build a gzipped tar archive of the installation directory:

    tar --create --gzip --file xenial_i386.tar.gz --directory xenial_i386_chroot .
    
  • Create a Docker image from the archive you have built: $ cat xenial_i386.tar.gz | docker import - ubuntu_i386:xenial_base. You can then see the image listed in the output of $ docker images

  • Create a copy of this docker file in the build directory: https://github.com/google/grr/blob/master/docker/Dockerfile.build_ubuntu_i386⁠

  • Use the docker file to create a new image with dependencies that Travis needs to build templates installed:

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

  • Push the 32-bit image to dockerhub with both the 'xenial' and 'latest' tags:

    docker push grrdocker/ubuntu_i386:xenial && \
        docker push grrdocker/ubuntu_i386:latest
    

Tag summary

Content type

Image

Digest

Size

620.4 MB

Last updated

about 9 years ago

docker pull grrdocker/ubuntu_i386