added a dockerfile, updateed install.sh to not prompt to accept new host

This commit is contained in:
Ray Slakinski 2024-12-02 14:41:47 -05:00
parent e506dec095
commit 10a0d7ad00
No known key found for this signature in database
GPG Key ID: D6E793433D81EEE4
2 changed files with 19 additions and 3 deletions

16
Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y \
sshpass
WORKDIR /nextdns
COPY install.sh .
COPY nextdns.conf .
COPY nextdns_install.sh .
COPY pw .
RUN chmod +x install.sh
RUN chmod +x nextdns_install.sh
ENTRYPOINT ["./install.sh"]

View File

@ -2,6 +2,6 @@
export NEXTDNS_PASSWORD=$(cat pw)
sshpass -p $NEXTDNS_PASSWORD scp nextdns_install.sh root@192.168.1.1:/root/nextdns_install.sh
sshpass -p $NEXTDNS_PASSWORD scp nextdns.conf root@192.168.1.1:/data/nextdns.conf
sshpass -p $NEXTDNS_PASSWORD ssh root@192.168.1.1 "chmod +x /root/nextdns_install.sh && /root/nextdns_install.sh install"
sshpass -p $NEXTDNS_PASSWORD scp -o "StrictHostKeyChecking no" nextdns_install.sh root@192.168.1.1:/root/nextdns_install.sh
sshpass -p $NEXTDNS_PASSWORD scp -o "StrictHostKeyChecking no" nextdns.conf root@192.168.1.1:/data/nextdns.conf
sshpass -p $NEXTDNS_PASSWORD ssh -o "StrictHostKeyChecking no" root@192.168.1.1 "chmod +x /root/nextdns_install.sh && /root/nextdns_install.sh install"