Giter Club home page Giter Club logo

Comments (11)

klutchell avatar klutchell commented on June 2, 2024 1

from dnscrypt-proxy-docker.

CHerSun avatar CHerSun commented on June 2, 2024 1

Wow, thank you for this! I've finally added a healthcheck to my last container.

Would be great if you could add this info to docker hub & repo readme (edit: just noted this info is already on repo readme).

from dnscrypt-proxy-docker.

klutchell avatar klutchell commented on June 2, 2024 1

Good catch @CHerSun , I found a bug in the script that is supposed to update the DockerHub description and it should be fixed next time we merge a PR.

from dnscrypt-proxy-docker.

roobre avatar roobre commented on June 2, 2024

My only requirements are:

  • Being able to query on non-standard ports (i.e. not only 53)
  • Have the command exit with non-zero code if the query fails

I've done a quick check and seems like doggo can do the former @udp://10.0.0.5:5533, but I haven't managed to achieve the latter

roobre@Archiroo
12:31:06   ~ $> doggo foo.bar.local A @udp://1.1.1.1:53
NAME	TYPE	CLASS	TTL   	ADDRESS                       	NAMESERVER	STATUS
.   	SOA 	IN   	86400s	a.root-servers.net.           	1.1.1.1:53	NXDOMAIN	
    	    	     	      	nstld.verisign-grs.com.       	          	        	
    	    	     	      	2023032300 1800 900 604800    	          	        	
    	    	     	      	86400                         	          	        	

roobre@Archiroo
12:31:13   ~ $> echo $?
0

Taking a look right now to see if there's any cli flag I'm missing.

from dnscrypt-proxy-docker.

roobre avatar roobre commented on June 2, 2024

Seems like there's a bug in doggo which prevents it from existing with non-zero code even when it should. I've reported it here mr-karan/doggo#68

from dnscrypt-proxy-docker.

roobre avatar roobre commented on June 2, 2024

After further investigation, it seems like an NXDOMAIN also does not cause doggo to exit with an error, this time it seems by design. This would make hard to use it to use it as a probe, especially if the image does not contain grep or a shell to hack around this limitation :(

from dnscrypt-proxy-docker.

klutchell avatar klutchell commented on June 2, 2024

I think the NXDOMAIN limitation is true of dig as well: https://linux.die.net/man/1/dig

Dig return codes are:
0: Everything went well, including things like NXDOMAIN
1: Usage error
8: Couldn't open batch file
9: No reply from server
10: Internal error

from dnscrypt-proxy-docker.

roobre avatar roobre commented on June 2, 2024

:oof:, that certainly complicates things 🤔
Not sure what the best approach could be here. Took a look at the PR linked above, and I think that it would work, but seems like a lot of complexity for a simple probe.

Perhaps we could do an ad-hoc go program for this, WDYT? Compiling it may be annoying but I think it can be less annoying than copying dynamically linked binaries from alpine.

I wouldn't mind hacking something together on a PR if you're okay with this :)

from dnscrypt-proxy-docker.

klutchell avatar klutchell commented on June 2, 2024

By all means, PRs are welcome!

from dnscrypt-proxy-docker.

roobre avatar roobre commented on June 2, 2024

@klutchell Gave this a swing in #117, LMK what you think!

from dnscrypt-proxy-docker.

klutchell avatar klutchell commented on June 2, 2024

Resolved by #117

from dnscrypt-proxy-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.