Skip to content

Instantly share code, notes, and snippets.

@TopperBG
Created November 10, 2022 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TopperBG/9224a15d784facb3bb00e069c3c7e009 to your computer and use it in GitHub Desktop.
Save TopperBG/9224a15d784facb3bb00e069c3c7e009 to your computer and use it in GitHub Desktop.
File to update docker container and parsed with containers_update.sh
TARGET=lscr.io/linuxserver/bazarr:latest
LATEST=$(docker image inspect $TARGET --format '{{.Created}}' | grep -Eo '[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}')
CURRENT=$(< image.date)
if [[ "$LATEST" != "$CURRENT" ]]; then
echo "$LATEST" > image.date
docker stop bazarr
docker rm bazarr
docker pull $TARGET
docker run -d \
--name=bazarr \
-e PUID=1000 \
-e PGID=136 \
-e UMASK=002 \
-e TZ=Europe/Sofia \
-p 6767:6767 \
-v /etc/bazarr/config:/config \
-v /home/lib/Movies:/home/lib/Movies `#optional` \
-v /home/lib/Movies:/movies \
-v /home/lib/tv:/home/lib/tv \
--restart unless-stopped \
--network host \
$TARGET
else
echo "Already latest $TARGET"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment