How to Connect to Docker boxes when using executor type docker



I’m using CircleCi 2.0 and am using the docker executor type. I have a basic ubuntu container I’m using as my build environment image. In that I’m spinning up a new nginx container and exposing port 80, but I cannot connect to the docker container from the primary container. Is there anything I need to specify. Here’s how I’m spinning up my docker container (from inside the ubuntu docker container).

docker run -d -p 80:80 $AWS_ACCOUNT_ID.dkr.ecr.$$CIRCLE_PROJECT_REPONAME:$CIRCLE_SHA1

The container deploys fine. The only issue is the fact that I can’t test it before deploying.

Can't connect to docker container

I’m having pretty much the same issue, so keeping your post up to see if we get an answer! Running protractor/selenium tests against container


So figured this out. Because you are booting up in a docker container, you can’t connect to your containers (

What I had to resort to was the following docker run --rm byrnedo/alpine curl


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.