From 35a241aed0b292627bb249d62c8ad68bd114ee63 Mon Sep 17 00:00:00 2001 From: Harry Date: Thu, 21 Jul 2022 12:09:51 +0100 Subject: [PATCH 1/2] feat(registry) automate re-start docker registry --- restartRegistry.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 restartRegistry.sh diff --git a/restartRegistry.sh b/restartRegistry.sh new file mode 100755 index 0000000..7e49822 --- /dev/null +++ b/restartRegistry.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +IFS=' +' +cd -P "$(dirname "$0")" + +# Stop and remove registry container +docker container stop registry && docker container rm registry + +# Kill processes using port 8081 (registry service) +kill -9 $(lsof -t -i:8081) + +# Re-create and run the registry contianer +docker run --detach --publish 5000:5000 --restart=unless-stopped --name registry --volume registry:/var/lib/registry registry:2.7.1 + +# Relaunch registry service +./registry -port 8081 2>log.txt & \ No newline at end of file From 10959849e84315903ca91f08655c4b55dc6dbe72 Mon Sep 17 00:00:00 2001 From: Harry Date: Thu, 21 Jul 2022 21:48:06 +0100 Subject: [PATCH 2/2] feat(registry): automate re-start docker registry --- restartRegistry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restartRegistry.sh b/restartRegistry.sh index 7e49822..61ce359 100755 --- a/restartRegistry.sh +++ b/restartRegistry.sh @@ -14,4 +14,4 @@ kill -9 $(lsof -t -i:8081) docker run --detach --publish 5000:5000 --restart=unless-stopped --name registry --volume registry:/var/lib/registry registry:2.7.1 # Relaunch registry service -./registry -port 8081 2>log.txt & \ No newline at end of file +./registry -port 8081 2>log.txt &