set docker ram memory limit in release script

master
Tudor Stanciu 2022-02-18 09:35:30 +02:00
parent 4ca812adcf
commit 5b408e6e63
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ echo "Stop old container."
docker stop identity-server && docker rm identity-server docker stop identity-server && docker rm identity-server
echo "Run new container." echo "Run new container."
docker run -d --name identity-server --restart=always -p 5007:80 alpine-nexus:8500/identity/identity-server:$version 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
echo "Remove old image identity-server:$oldver." echo "Remove old image identity-server:$oldver."
docker rmi alpine-nexus:8500/identity/identity-server:$oldver docker rmi alpine-nexus:8500/identity/identity-server:$oldver