eg within a container:

root@concourse-worker-1:/# getent hosts hostname.com
10.1.0.10 hostname.com

or host

root@concourse-worker-1:/# host msf-docker.artifactory.io.lab

You could leave a comment if you were logged in.