The Dockerfile now uses a loop to run the backup script every 60 seconds. Added `curl` installation and a curl command in `backup.sh` for external script execution. Removed unused echo statements for clarity.
9 lines
317 B
Docker
9 lines
317 B
Docker
FROM ubuntu:latest
|
|
LABEL authors="Jeppe B"
|
|
RUN apt-get update && apt-get install -y cron curl
|
|
COPY backup.sh /backup.sh
|
|
RUN chmod +x /backup.sh
|
|
# Set the timezone
|
|
RUN ln -fs /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime
|
|
# Loop sleep, run backup.sh every 60 seconds
|
|
CMD while true; do /backup.sh; sleep 60; done |