How to tell if Duck DNS container is actually working

Usually when I’ve put up a container I use these commands to check the status of the install:

docker exec duckdns env
docker container inspect duckdns -f '{{range .Mounts}}{{.Type}}:{{.Source}}:{{.Destination}}{{println}}{{ end }}'
docker-compose logs duckdns

Once that’s done I open whichever web interface is appropriate for that container. Easy enough.

My question is how do I check the status of the Duck DNS container? With the standard script suggested and provided by Duck DNS themselves, the following works:

sudo chmod -R 700 duckdns
cd duckdns
./duck.sh
cat duck.log

This will return either OK if running or KO if there was an issue.

I do see that checking the logs with docker-compose logs duckdns will show the following:

duckdns    | Your IP was updated at Tue Jan  4 07:43:53 MST 2022
duckdns    | [cont-init.d] 40-config: exited 0.
duckdns    | [cont-init.d] 90-custom-folders: executing...
duckdns    | [cont-init.d] 90-custom-folders: exited 0.
duckdns    | [cont-init.d] 99-custom-files: executing...
duckdns    | [custom-init] no custom files found exiting...
duckdns    | [cont-init.d] 99-custom-files: exited 0.
duckdns    | [cont-init.d] done.
duckdns    | [services.d] starting services
duckdns    | [services.d] done.
duckdns    | Your IP was updated at Tue Jan  4 07:47:00 MST 2022
[...]
duckdns    | Your IP was updated at Tue Jan  4 15:42:00 MST 2022

So the container is working, but is there a simple log file or service that can be pinged to confirm if the system is up or not?

I don’t understand what you’re trying to do. The docker log tells you if it’s working or not, and updates every 5 minutes.

You can optionally output the log to a file

I was hoping for a file I could query to determine the most recent status. That’s all.

Also, is the way I am checking status the correct method for this container?

You can have it output the log to a file.

What way? You just check the log and if it says Your IP was updated at blah it’s working

Was hoping to have an easy way to determine status without a bunch of scripting, but I can parse the log if I need to. Thanks for confirming everything looks good!

You need to be more specific about what you’re trying to accomplish. When you say determine status, what exactly do you mean? Or who is trying to make that determination?

If it’s you, then look at the docker log or the log file. If it’s something else, tell us what it is. It will likely involve some scripting if it’s not you.

Also, what exact status are you trying to determine? Whether the container is running? Whether the service is running? Whether the IP is getting updated on duckdns? Each one has a different answer.

This post was flagged by the community and is temporarily hidden.