Set container hostname to "seafile".

This commit is contained in:
Shuai Lin 2016-11-21 13:34:46 +08:00
parent 53bc05d2ef
commit c2d58f299b
2 changed files with 3 additions and 12 deletions

View file

@ -14,5 +14,5 @@ script:
- sudo ./launcher bootstrap
- sudo ./launcher start && sleep 10
- sudo ./launcher stop --skip-prereqs
- sudo ./launcher start --docker-args "-h seafile-server" && sleep 10
- sudo ./launcher start --docker-args "--memory 1g" && sleep 10
- sudo ./launcher restart

View file

@ -126,14 +126,6 @@ bootstrap() {
docker build -f bootstrap/generated/Dockerfile -t local_seafile/server:latest .
}
oldstart() {
set_volumes
set_ports
docker run $user_args --rm -it --name seafile $volumes $ports $image \
/sbin/my_init -- bash -l
# /sbin/my_init -- /scripts/start.py
}
start() {
existing=$(docker ps | awk '{ print $1, $(NF) }' | grep " seafile$" | awk '{ print $1 }' || true)
if [[ $existing != "" ]]; then
@ -154,7 +146,6 @@ start() {
set_volumes
set_ports
local restart_policy attach_on_run
if [[ "${SUPERVISED}" = "true" ]]; then
restart_policy="--restart=no"
@ -165,7 +156,7 @@ start() {
(
set -x
docker run $user_args $attach_on_run $restart_policy --name seafile $volumes $ports $local_image
docker run $user_args $attach_on_run $restart_policy --name seafile -h seafile $volumes $ports $local_image
)
}
@ -229,7 +220,7 @@ main() {
while [[ $# -gt 0 ]]
do
case "$1" in
bootstrap|oldstart|start|stop|restart|enter|destroy|logs|rebuild)
bootstrap|start|stop|restart|enter|destroy|logs|rebuild)
action=$1 ; shift 1 ;;
--debug) debug=true ; shift 1 ;;
--skip-prereqs) SKIP_PREREQS=true ; shift 1 ;;