summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2020-10-25 22:48:38 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2020-10-25 22:48:38 -0700
commit1c1220af3906a0de86f441cdf385df57feeb9f96 (patch)
tree089df11da56610b3116b8bb4c4936a2061bff8f6
parentAdd mpagano to the planet again (diff)
downloadplanet-1c1220af3906a0de86f441cdf385df57feeb9f96.tar.gz
planet-1c1220af3906a0de86f441cdf385df57feeb9f96.tar.bz2
planet-1c1220af3906a0de86f441cdf385df57feeb9f96.zip
update-planet: cleanup containersv2.0.13
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xupdate-planet.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/update-planet.sh b/update-planet.sh
index 7e4792f3..f5a09a7f 100755
--- a/update-planet.sh
+++ b/update-planet.sh
@@ -1,12 +1,20 @@
#!/bin/sh
+TS=(date --iso=sec -u |sed -r 's,.00:00$,,g' |tr -c -d '[0-9]')
+IMAGE=gentoo/planet-pluto
+TAG=latest
+
USER=${1:-gplanet}
GROUP=${2:-gplanet}
mkdir -p htdocs data
chown -R $USER:$GROUP htdocs data
-docker run --privileged \
- --mount type=bind,source="$(pwd)"/htdocs,target=/var/www/planet.gentoo.org/build \
- --mount type=bind,source="$(pwd)"/data,target=/var/www/planet.gentoo.org/data \
- gentoo/planet-pluto:latest
+docker run \
+ --rm \
+ --privileged \
+ --restart no \
+ --mount type=bind,source="$(pwd)"/htdocs,target=/var/www/planet.gentoo.org/build \
+ --mount type=bind,source="$(pwd)"/data,target=/var/www/planet.gentoo.org/data \
+ --name ${IMAGE}_${TS}
+ ${IMAGE}:${TAG}