diff --git a/Dockerfile b/Dockerfile index f585d69..84b2d2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM ubuntu:latest +# Use Alpine as the base image +FROM alpine:latest # Install necessary packages -RUN apt-get update && \ - apt-get install -y git curl rsync +RUN apk --no-cache add git curl rsync # Add script COPY repo_watcher.sh /root/Repo_Watcher/repo_watcher.sh @@ -10,5 +10,5 @@ COPY repo_watcher.sh /root/Repo_Watcher/repo_watcher.sh # Make script executable RUN chmod +x /root/Repo_Watcher/repo_watcher.sh -# Start script -CMD ["/bin/bash", "-c", "/root/Repo_Watcher/repo_watcher.sh"] \ No newline at end of file +# Start script (Alpine uses /bin/sh instead of /bin/bash) +CMD ["/bin/sh", "-c", "/root/Repo_Watcher/repo_watcher.sh"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index f835f92..efcb839 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,13 +3,6 @@ services: git-repo-updater: privileged: true container_name: git-repo-updater - environment: - - REPO_URL=${REPO_URL} - - COPY_DIR=${COPY_DIR} - - NTFY_URL=${NTFY_URL} - - GIT_USERNAME=${GIT_USERNAME} - - GIT_PASSWORD=${GIT_PASSWORD} - - TZ=America/Denver image: git.cyberstrawberry.net/container-registry/git-repo-updater:latest volumes: #This folder is where the repository will be downloaded and updated - it needs a unique folder name. diff --git a/repo_watcher.sh b/repo_watcher.sh index 85ac6a9..4850be3 100644 --- a/repo_watcher.sh +++ b/repo_watcher.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh while true; do # Set Git credentials @@ -41,4 +41,4 @@ while true; do # Wait for 5 seconds before the next iteration sleep 5 -done \ No newline at end of file +done