Skip to content

Instantly share code, notes, and snippets.

@brandonsoto
Created April 22, 2017 07:53
Show Gist options
  • Save brandonsoto/f1cf7cb65baae9d00b02d6dcca29f48e to your computer and use it in GitHub Desktop.
Save brandonsoto/f1cf7cb65baae9d00b02d6dcca29f48e to your computer and use it in GitHub Desktop.
Auto building docker images with Travis
sudo: required
services:
- docker
language: bash
script:
- docker build -f Dockerfile-server -t brandonsoto/vsserver:latest .
# prepare qemu
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
# build image
- docker build -f Dockerfile-client -t brandonsoto/vsclient:latest .
# test image
- docker run brandonsoto/vsserver
- docker run brandonsoto/vsclient
# push image
- >
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
docker push brandonsoto/vsserver:latest
docker push brandonsoto/vsclient:latest
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment