Skip to content

Commit

Permalink
Merge pull request #7 from james-stevens/dev
Browse files Browse the repository at this point in the history
add some push to repo scripts
  • Loading branch information
james-stevens authored Jun 22, 2022
2 parents 515bcc3 + 2ffe1d9 commit 7b2e468
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions list
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
epprest
File renamed without changes.
20 changes: 20 additions & 0 deletions push_to_docker_jrcs_net
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#! /bin/sh

if test "$1"; then imgs="$*"; else imgs="$(cat list)"; fi

for img in ${imgs}
do
id=$(docker image ls | awk '{ if ($1=="'"${img}"'") print $3 }')

docker tag ${id} docker.jrcs.net/${img}
docker push docker.jrcs.net/${img}
done

while test "$(docker ps -aq)"
do
docker rm $(docker ps -aq)
done
while test "$(docker images -f "dangling=true" -q)"
do
docker rmi $(docker images -f "dangling=true" -q)
done

0 comments on commit 7b2e468

Please sign in to comment.