seafile-containerized/ci/publish-image.sh

23 lines
662 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-05-09 10:36:10 +00:00
docker rm -f $(docker ps -a -q)
docker rmi -f $(docker images -a -q)
2018-12-19 09:26:27 +00:00
docker pull seafileltd/base:18.04
2016-12-21 07:53:07 +00:00
(
cd image
make server push-server
)