Skip to content

Commit

Permalink
Bump Alpine version to 3.19; minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
clockworksoul committed Feb 19, 2024
1 parent dc9fcc4 commit 3444a2b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:3.13
FROM alpine:3.19

LABEL maintainer="Matt Titmus <[email protected]>"
LABEL date="2021-05-19"
LABEL date="2024-02-19"

ARG DOCKER_VERSION=1.11.1

Expand Down
6 changes: 2 additions & 4 deletions build/executed-by-cron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ echo "[$(date)] Docker GC starting." >> /var/log/cron.log 2>&1

/usr/bin/docker-gc >> /var/log/cron.log 2>&1

if [ "$CLEAN_UP_VOLUMES" -eq "1" ]
then
if [ $(docker volume ls -qf dangling=true | wc -l) -gt 0 ]
then
if [ "$CLEAN_UP_VOLUMES" == "1" ]; then
if [ "$(docker volume ls -qf dangling=true | wc -l)" -gt 0 ]; then
echo "Cleaning up dangling volumes." >> /var/log/cron.log 2>&1
docker volume rm $(docker volume ls -qf dangling=true) >> /var/log/cron.log 2>&1
else
Expand Down
32 changes: 11 additions & 21 deletions build/generate-crontab.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#!/bin/bash

DEFAULT_CRON="0 9 * * *"
DEFAULT_CRON="0 0 * * *"

if [ "$CRON" ]
then
if [ "$CRON" ]; then
echo "Using user-defined CRON variable: $CRON"
else
echo "CRON variable undefined. Using default of \"$DEFAULT_CRON\""
Expand All @@ -12,48 +11,39 @@ fi

GC_ARGS=""

if [ "$CLEAN_UP_VOLUMES" ]
then
if [ "$CLEAN_UP_VOLUMES" ]; then
GC_ARGS="$GC_ARGS CLEAN_UP_VOLUMES=$CLEAN_UP_VOLUMES"
fi

if [ "$DRY_RUN" ]
then
if [ "$DRY_RUN" ]; then
GC_ARGS="$GC_ARGS DRY_RUN=$DRY_RUN"
fi

if [ "$EXCLUDE_VOLUMES_IDS_FILE" ]
then
if [ "$EXCLUDE_VOLUMES_IDS_FILE" ]; then
GC_ARGS="$GC_ARGS EXCLUDE_VOLUMES_IDS_FILE=$EXCLUDE_VOLUMES_IDS_FILE"
fi

if [ "$FORCE_CONTAINER_REMOVAL" ]
then
if [ "$FORCE_CONTAINER_REMOVAL" ]; then
GC_ARGS="$GC_ARGS FORCE_CONTAINER_REMOVAL=$FORCE_CONTAINER_REMOVAL"
fi

if [ "$FORCE_IMAGE_REMOVAL" ]
then
if [ "$FORCE_IMAGE_REMOVAL" ]; then
GC_ARGS="$GC_ARGS FORCE_IMAGE_REMOVAL=$FORCE_IMAGE_REMOVAL"
fi

if [ "$GRACE_PERIOD_SECONDS" ]
then
if [ "$GRACE_PERIOD_SECONDS" ]; then
GC_ARGS="$GC_ARGS GRACE_PERIOD_SECONDS=$GRACE_PERIOD_SECONDS"
fi

if [ "$MINIMUM_IMAGES_TO_SAVE" ]
then
if [ "$MINIMUM_IMAGES_TO_SAVE" ]; then
GC_ARGS="$GC_ARGS MINIMUM_IMAGES_TO_SAVE=$MINIMUM_IMAGES_TO_SAVE"
fi

if [ "$REMOVE_VOLUMES" ]
then
if [ "$REMOVE_VOLUMES" ]; then
GC_ARGS="$GC_ARGS REMOVE_VOLUMES=$REMOVE_VOLUMES"
fi

if [ "$VOLUME_DELETE_ONLY_DRIVER" ]
then
if [ "$VOLUME_DELETE_ONLY_DRIVER" ]; then
GC_ARGS="$GC_ARGS VOLUME_DELETE_ONLY_DRIVER=$VOLUME_DELETE_ONLY_DRIVER"
fi

Expand Down

0 comments on commit 3444a2b

Please sign in to comment.