network-resurrector-frontend/scripts/release.sh

22 lines
749 B
Bash

#!/bin/sh
echo "Welcome!"
version="1.1.0"
oldver="1.0.1"
echo "Pull docker image network-resurrector-frontend:$version from registry."
docker pull alpine-nexus:8500/network-resurrector/network-resurrector-frontend:$version
echo "Stop old container."
docker stop network-resurrector-frontend && docker rm network-resurrector-frontend
echo "Run new container."
docker run -d --name network-resurrector-frontend --restart=always -p 5009:80 alpine-nexus:8500/network-resurrector/network-resurrector-frontend:$version
echo "Remove old image network-resurrector-frontend:$oldver."
docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-frontend:$oldver
echo "Get container logs:"
docker logs network-resurrector-frontend
echo "DONE!"