2016-12-21 07:53:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
######################################
|
2018-04-12 09:33:42 +00:00
|
|
|
# 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-05-09 10:36:10 +00:00
|
|
|
docker rm -f $(docker ps -a -q)
|
|
|
|
docker rmi -f $(docker images -a -q)
|
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
|
|
|
|
)
|