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