Switch Arch to Alpine
This commit is contained in:
parent
bb82423afd
commit
7417679777
10
Dockerfile
10
Dockerfile
@ -1,8 +1,8 @@
|
|||||||
FROM ubuntu:latest
|
# Use Alpine as the base image
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
# Install necessary packages
|
# Install necessary packages
|
||||||
RUN apt-get update && \
|
RUN apk --no-cache add git curl rsync
|
||||||
apt-get install -y git curl rsync
|
|
||||||
|
|
||||||
# Add script
|
# Add script
|
||||||
COPY repo_watcher.sh /root/Repo_Watcher/repo_watcher.sh
|
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
|
# Make script executable
|
||||||
RUN chmod +x /root/Repo_Watcher/repo_watcher.sh
|
RUN chmod +x /root/Repo_Watcher/repo_watcher.sh
|
||||||
|
|
||||||
# Start script
|
# Start script (Alpine uses /bin/sh instead of /bin/bash)
|
||||||
CMD ["/bin/bash", "-c", "/root/Repo_Watcher/repo_watcher.sh"]
|
CMD ["/bin/sh", "-c", "/root/Repo_Watcher/repo_watcher.sh"]
|
@ -3,13 +3,6 @@ services:
|
|||||||
git-repo-updater:
|
git-repo-updater:
|
||||||
privileged: true
|
privileged: true
|
||||||
container_name: git-repo-updater
|
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
|
image: git.cyberstrawberry.net/container-registry/git-repo-updater:latest
|
||||||
volumes:
|
volumes:
|
||||||
#This folder is where the repository will be downloaded and updated - it needs a unique folder name.
|
#This folder is where the repository will be downloaded and updated - it needs a unique folder name.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# Set Git credentials
|
# Set Git credentials
|
||||||
@ -41,4 +41,4 @@ while true; do
|
|||||||
# Wait for 5 seconds before the next iteration
|
# Wait for 5 seconds before the next iteration
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user