Skip to content

Commit e759ea6

Browse files
committed
ospool-image-puller: Add KEEP_DAYS parameter to Dockerfile and cron job
1 parent 7105b98 commit e759ea6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

opensciencegrid/ospool-image-puller/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ COPY --chmod=0755 startup.sh /bin/startup.sh
1818
ENV CRON_EXPR="30 5 * * *"
1919
ENV TIMEOUT="23h"
2020
ENV IMAGES_UID="1000"
21+
ENV KEEP_DAYS=10
2122

2223
VOLUME ["/ospool/images"]
2324

2425
CMD ["/bin/startup.sh"]
25-

opensciencegrid/ospool-image-puller/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ install -o images -d "${TARGET_DIR}"
1616
# the container's stdout/err, but then drop privileges to run the
1717
# actual script.
1818

19-
echo "${CRON_EXPR?} root cd /ospool/images-scripts && /usr/sbin/runuser -u images -- timeout -k 60s ${TIMEOUT?} ./update.py ${TARGET_DIR}" '> /proc/1/fd/1 2>&1' > /etc/cron.d/update.cron
19+
echo "${CRON_EXPR?} root cd /ospool/images-scripts && /usr/sbin/runuser -u images -- timeout -k 60s ${TIMEOUT?} ./update.py --keep-days=${KEEP_DAYS:-10} ${TARGET_DIR}" '> /proc/1/fd/1 2>&1' > /etc/cron.d/update.cron
2020

2121
# Start cron in non-daemon (foreground) mode
2222
echo >&2 "Starting cron"

0 commit comments

Comments
 (0)