Mercurial > sat_docs
view docker/do_all.sh @ 80:686a8c982c3f
docker: updated Dockerfiles:
- use HTTPS URLs instead of HTTP
- prosody image know use prosody Debian repository instead of Debian Jessie version, prosody 0.10 is used
- prosody configuration is now in prosody directory next to Dockerfile, instead of using difficult to maintain sed calls
- community modules are downloaded from mercurial, and only needed ones are kept
- no more remote-roster hack \o/
- pubsub component is not at pubsub.[domain] (was sat-pubsub before)
- SàT media are gotten from hg instead of ftp, so they are up-to-date with SàT version
- libervia image now use pip for txJSON-RPC
- fixed now needed jinja2 installation
- fixed libervia/admin accounts auto-creation script
- fixed uid/gid for prosody in data image
- removed not needed anymore nox option in base image
- added python-pip in base image
- docker images now work with current dev version (0.6.0D)
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 12 Feb 2016 20:24:24 +0100 |
parents | b2a09608bd9b |
children | bcba1966e6db |
line wrap: on
line source
#!/bin/sh # This script build all container in the right order # Copyright (C) 2014 Jérôme Poisson (goffi@goffi.org) # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. DIRS="base media sat_nomedia sat jp primitivus prosody sat_pubsub salut libervia data" ACCOUNT="salutatoi" ori_dir=$(pwd) if [ $# -eq 0 ]; then cmd="build" else case $1 in build) cmd="build" BEFORE="-t" AFTER="." ;; push) cmd="push" TAG=":latest" ;; pull) cmd="pull" TAG=":latest" ;; *) printf "Invalid command ($1)\n" exit 1 ;; esac shift fi for cont_dir in $DIRS; do cont_name=$(grep -o "Salut à Toi/[^ ]\+" $cont_dir/Dockerfile | sed "s&Salut à Toi/&&" | tr '[:upper:]' '[:lower:]') cd "$cont_dir" printf "\n==> Doing a $cmd for $ACCOUNT/$cont_name in $cont_dir with extra [$@] <===\n\n" docker $cmd $BEFORE "$ACCOUNT/${cont_name}${TAG}" "$@" $AFTER err=$? cd "$ori_dir" if [ $err -ne 0 ]; then printf "$cmd of $cont_name failed (exit code $err), exiting\n" exit 1 fi done