I’m working on pymssql where we are using docker-compose to spin up mssql and a python manylinux image to build and run tests. Some of the test use tcp to verify that different connection styles. To run the test locally I use the bridge driver in the docker-compose.yml and set the IP of the machines so that the test can run. The docker-compose.yml looks like:
version: '2' services: sqlserver: image: microsoft/mssql-server-linux environment: - ACCEPT_EULA=Y - SA_PASSWORD=$SQLPASSWORD ports: - 1433:1433 logging: driver: "none" networks: vpcbr: ipv4_address: 10.5.0.5 pymssql: image: quay.io/pypa/manylinux1_x86_64 depends_on: - sqlserver volumes: - .:/io command: ./io/dev/build_wheels.sh networks: vpcbr: ipv4_address: 10.5.0.6 networks: vpcbr: driver: bridge ipam: config: - subnet: 10.5.0.0/16 gateway: 10.5.0.1
I am now trying to use this with the local circleci cli tool and get the following error:
#!/bin/sh -eo pipefail docker-compose up -d Creating network "project_vpcbr" with driver "bridge" ERROR: Pool overlaps with other one on this address space Error: Exited with code 1 Step failed Error: runner failed Task failed
My config.yml file looks like:
version: 2 jobs: build: docker: - image: docker/compose:1.22.0 steps: - checkout - setup_remote_docker - run: name: folder listing for debugging command: ls -al - run: name: Build docker-compose containers command: | docker-compose build - run: name: Start containers command: | docker-compose up -d - run: name: Show dists command: | ls dists/
Any suggestions on how I can use a static ip address with the containers so that our tcp connection tests can run in circleci?