summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update-planet.sh')
-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}