Added Dockerfile and docker-compose.yml
This commit is contained in:
parent
1cc7669817
commit
41362d2783
37
Dockerfile
Executable file
37
Dockerfile
Executable file
@ -0,0 +1,37 @@
|
||||
FROM alpine:latest
|
||||
MAINTAINER Christian Baer <chris@debilux.org>
|
||||
|
||||
ENV TZ "UTC"
|
||||
|
||||
## Run cron every minute
|
||||
ENV SCHEDULE "* * * * *"
|
||||
|
||||
ENV GIT_REPO "https://github.com/chrisb86/nsupdate"
|
||||
ENV NSUPDATE_CONFD_DIR="/config"
|
||||
ENV NSUPDATE_LOG_DIR="/log"
|
||||
|
||||
## Install requirements
|
||||
RUN apk update
|
||||
RUN apk add --update-cache \
|
||||
git \
|
||||
curl \
|
||||
libxml2-utils
|
||||
|
||||
# Read timezone from server, so in docker-compose you can change TZ
|
||||
RUN apk add --no-cache tzdata
|
||||
|
||||
RUN ln -sf "/usr/share/zoneinfo/$TZ" /etc/localtime && \
|
||||
echo "$TZ" > /etc/timezone && date
|
||||
|
||||
## Clone git repo
|
||||
RUN mkdir app
|
||||
RUN git clone $GIT_REPO /app
|
||||
|
||||
## Setup cron job
|
||||
RUN echo "${SCHEDULE} sh /app/nsupdate.sh" >> /etc/crontabs/root
|
||||
|
||||
## Start crond
|
||||
CMD [ "crond", "-l", "2", "-f" ]
|
||||
|
||||
VOLUME /config
|
||||
VOLUME /log
|
@ -58,6 +58,10 @@ To run the script every 5 minutes and suppress the output you can write somethin
|
||||
|
||||
## Changelog
|
||||
|
||||
**2022-12-14**
|
||||
- Added Dockerfile
|
||||
- Added docker-compose.yml
|
||||
|
||||
**2022-10-18**
|
||||
|
||||
- Completly rewritten. nsupdate is now a POSIX compliant /bin/sh script 👍🏻
|
||||
|
12
docker-compose.yml
Executable file
12
docker-compose.yml
Executable file
@ -0,0 +1,12 @@
|
||||
version: "3.3"
|
||||
services:
|
||||
sonarr:
|
||||
image: nsupdate:latest
|
||||
container_name: nsupdate
|
||||
environment:
|
||||
- NSUPDATE_INWX_USER=YOUR_INWX_USERNAME
|
||||
- NSUPDATE_INWX_PASSWORD=YOUR_INWX_PASSWORD
|
||||
volumes:
|
||||
- ./data:/config
|
||||
- ./log:/log
|
||||
restart: unless-stopped
|
Loading…
x
Reference in New Issue
Block a user