language: bash
services: docker

env:
  - VARIANT=debian
  - VARIANT=alpine

install:
  - git clone https://github.com/docker-library/official-images.git ~/official-images

before_script:
  - env | sort
  - image="memcached:$VARIANT"

script:
  - travis_retry docker build -t "$image" "$VARIANT"
  - ~/official-images/test/run.sh "$image"

after_script:
  - docker images

# vim:set et ts=2 sw=2:

language: bash
services: docker

env:
  - VARIANT=debian
  - VARIANT=alpine
  - VARIANT=debian ARCH=i386
  - VARIANT=alpine ARCH=i386

install:
  - git clone https://github.com/docker-library/official-images.git ~/official-images

before_script:
  - env | sort
  - image="memcached:$VARIANT"
  - |
    if [ -n "$ARCH" ]; then
        from="$(awk '$1 == toupper("FROM") { print $2 }' "$VARIANT/Dockerfile")"
        docker pull "$ARCH/$from"
        docker tag "$ARCH/$from" "$from"
    fi

script:
  - travis_retry docker build -t "$image" "$VARIANT"
  - ~/official-images/test/run.sh "$image"

after_script:
  - docker images

# vim:set et ts=2 sw=2:

Update Travis to also test i386 variants
Update Travis to also test i386 variants
