22 lines
703 B
Bash
22 lines
703 B
Bash
#!/bin/sh
|
|
echo "Welcome!"
|
|
|
|
version="1.0.7"
|
|
oldver="1.0.6"
|
|
|
|
echo "Pull docker image network-resurrector-api:$version from registry."
|
|
docker pull alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
|
|
|
echo "Stop old container."
|
|
docker stop network-resurrector-api && docker rm network-resurrector-api
|
|
|
|
echo "Run new container."
|
|
docker run -d --name network-resurrector-api --restart=always -p 5008:80 alpine-nexus:8500/network-resurrector/network-resurrector-api:$version
|
|
|
|
echo "Remove old image network-resurrector-api:$oldver."
|
|
docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:$oldver
|
|
|
|
echo "Get container logs:"
|
|
docker logs network-resurrector-api
|
|
|
|
echo "DONE!" |