Build Dockerfile-custom, tag the image docker build -t hebelek_custom -f Dockerfile-hebelek . Check if you can access another container host=db; port=3306; (echo >/dev/tcp/${host}/${port}) &>/dev/null && echo "open" || echo "closed"