seafile-containerized/ci/publish-image.sh

22 lines
643 B
Bash
Raw Normal View History

2016-12-21 07:53:07 +00:00
#!/bin/bash
######################################
# Publish the seafile server image (e.g. seafileltd/seafile:6.2.5) to docker
2016-12-21 07:53:07 +00:00
# registry. This script should only be called during a travis build trigger by a tag.
######################################
2016-12-21 08:54:38 +00:00
# Nerver use "set -x" or it would expose the docker credentials in the travis logs!
set -e
2016-12-21 07:53:07 +00:00
set -o pipefail
2016-12-21 08:54:38 +00:00
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
2016-12-21 07:53:07 +00:00
## Always use the base image we build manually to reduce the download size of the end user.
2018-04-03 02:58:14 +00:00
docker rmi -f $(docker images | awk {'print $3'})
2017-01-03 07:08:34 +00:00
docker pull seafileltd/base:16.04
2016-12-21 07:53:07 +00:00
(
cd image
make server push-server
)