build and publish alpine based docker images

This commit is contained in:
Manuel Mendez 2017-10-03 23:24:14 -04:00
commit efafc4b597

View file

@ -24,12 +24,17 @@ script:
- rm -rf dist || true
# Linux Docker image
- docker build -t "$DOCKER_REPO:$TAG" .
# Linux Docker Alpine image
- sed -i 's|FROM scratch|FROM alpine:latest|' Dockerfile
- docker build -t "$DOCKER_REPO:$TAG-alpine" .
after_success:
- ./.prepare_deploy
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- |-
([ "$TRAVIS_BRANCH" == "master" ] || [ -n "$TRAVIS_TAG" ]) && docker push "$DOCKER_REPO:$TAG"
- |-
([ "$TRAVIS_BRANCH" == "master" ] || [ -n "$TRAVIS_TAG" ]) && docker push "$DOCKER_REPO:$TAG-alpine"
after_failure:
- id