#!/bin/bash # args action=${1:build} # ensure newest git pull if [ $1 == "rebuild" ]; then echo 'Rebuild OSPRO KIT-API Container' docker stop ospro_kit_api-container docker rm ospro_kit_api-container else echo 'Build New OSPOR KIT-API Container' fi # check volume docker volume inspect ospro if [ $? != 0 ]; then echo 'Create volume' docker volume create ospro fi docker build -t ospro/kit_api -f ./docker/Dockerfile-bullseye . docker run -d -v ospro:/ospro \ -p 127.0.0.1:8333:80 \ -p 127.0.0.1:8090:8090 \ --restart always \ --name ospro_kit_api-container ospro/kit_api