reverse-proxy-frontend/scripts/release.sh

22 lines
676 B
Bash

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