Export .env settings to .txt through shell script

I highly recommend to not write in the Docker folders directly.

Note that your appended command will overwrite the original (Docker Hub):

CMD ["/bin/bash" "/root/dyndns.sh"]

Maybe check this recent post about a similar topic.