Do you know if a CircleCI_Job which uses docker_executor can run & publish a container to the Docker Hosts IP address using -p option ?
More specifically, in the below config.yml in the job - build_runtime
build_runtime:
working_directory: ~/repo/docker
docker:
- image: circleci/node:12.0.0
environment:
steps:
- checkout:
path: ~/repo
- setup_remote_docker:
docker_layer_chaining: true
docker_layer_caching: true
- run:
name: create-runtime-docker
command: docker-compose build runtime
- run:
name: test-npm
command: |
npm install
export DOCKER_HOST_IP=$(echo $DOCKER_HOST | awk -F[/:] '{print $4}')
npm test
we call an npm test task which runs the below command. Where the IP 11.222.33.444 is that of the circleci docker host -> DOCKER_HOST=tcp://11.222.33.444:2376
docker run -d --name “contnr_name” -p 11.222.33.444::8080 <image_name>
Based on our observation the job just hangs until cancelled when we try to do something like this. Exact logs from circleci job is below:
InsideNpm: [npm-task] > docker run -d --name “content_name” -p 11.222.33.444::8080
-v /home/2019_10_01T23_16_19_166Z/in:/in:ro -v /home/2019_10_01T23_16_19_166Z/out:/out <image_name>:0.0.23
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
InsideNpm: [npm-task] > docker port 8b92dbd0b571d8e3228c6cc233d6d966dd920f437d02b228263dfe42059e78c7 8080
InsideNpm: [npm-task] initializing action: POST http://11.222.33.444:32768/init
…Step was canceled
This is an enterprise installation of CircleCI.