2021-11-12 19:12:40 +02:00
|
|
|
#!/bin/sh
|
|
|
|
echo "Welcome!"
|
|
|
|
|
2022-02-18 23:07:05 +02:00
|
|
|
version="1.1.3"
|
|
|
|
oldver="1.1.2"
|
2021-11-12 19:12:40 +02:00
|
|
|
|
|
|
|
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."
|
2022-02-18 09:35:30 +02:00
|
|
|
docker run -d --name identity-server --restart=always --memory 500mb --memory-reservation 100mb -p 5007:80 alpine-nexus:8500/identity/identity-server:$version
|
|
|
|
# https://phoenixnap.com/kb/docker-memory-and-cpu-limit
|
2021-11-12 19:12:40 +02:00
|
|
|
|
|
|
|
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!"
|