#!/bin/bash ############################# ## Pull latest image ## ############################# echo "=====================" echo "Fetching latest image" echo "=====================" docker pull soffid/pam-launcher env=$(docker inspect soffid-pam-launcher -f '{{range $index, $value := .Config.Env}} {{"-e "}} {{$value}} {{end}}') echo "=====================" echo "Creating launcher server" echo "=====================" docker stop soffid-pam-launcher docker rm soffid-pam-launcher docker create \ --network soffid.internal \ -v soffid-pam-launcher:/opt/soffid/tomee/launcher \ -v /var/run/docker.sock:/var/run/docker.sock \ -p 8082:8080 \ $env \ --name soffid-pam-launcher \ soffid/pam-launcher >/dev/null docker start soffid-pam-launcher >/dev/null