Yes I believe there is a way to accomplish what you are asking but there might be a better way to tackle this problem. Are you running these on separate jobs?
Where is the build happening? If you are using CircleCI for your CI solution then it would make sense to build it in Circle. However you make it sound like the build is happening on a server at Docker Hub.