Skip to content

Commit

Permalink
Update Dockerfile and setup to run correct scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed May 9, 2019
1 parent c5a0174 commit 03cd005
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN apt update -qq && \
apt-get clean

COPY --from=builder /build/dyndns-api /root/
COPY ./setup.sh /root/setup.sh
RUN chmod +x /root/setup.sh


ADD ./dyndnsConfig.json /tmp/
EXPOSE 8080
CMD ["/root/dyndns-api"]
EXPOSE 53 8080
ENTRYPOINT ["/root/setup.sh"]
11 changes: 7 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,20 @@ options {
EOF

echo "Creating dyndns api config"
cat <<EOF > /tmp/
cat > /root/dyndnsConfig.json <<EOF
{
"User": "${API_USER}",
"Password": "${API_PASSWORD}",
"Domains": "${DYNDNS_DOMAINS}",
"Domains": ${DYNDNS_DOMAINS},
"TTL": "${DYNDNS_TTL}"
}
EOF

mkdir -p /var/cache/bind

chown root:bind /var/cache/bind
chown bind:bind /var/cache/bind/*
chmod 770 /var/cache/bind
chmod 644 /var/cache/bind/*

service bind9 restart

/root/dyndns-api

0 comments on commit 03cd005

Please sign in to comment.