From 0b938f7b9b9a4ccdf4b17d15472a2587247c9e1e Mon Sep 17 00:00:00 2001 From: yuvipanda Date: Wed, 11 Jul 2018 02:15:47 -0700 Subject: [PATCH] Don't publish port / bind mount inside CircleCI The remote docker endpoint we have does not support doing bind mounts from the CircleCI Host. We also can not access the published external network port, so let's sotp doing that. --- .circleci/integration-test.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.circleci/integration-test.py b/.circleci/integration-test.py index 97ccc88..76c03a6 100644 --- a/.circleci/integration-test.py +++ b/.circleci/integration-test.py @@ -14,17 +14,12 @@ def build_systemd_image(image_name, source_path): ]) -def run_systemd_image(image_name, container_name, external_port, source_path): +def run_systemd_image(image_name, container_name): """ Run docker image with systemd Image named image_name should be built with build_systemd_image. - source_path is mounted to /srv/src in the container, so all changes to the - source are reflected in the host. - - Port 80 inside the container is made available to the host at external_port. - Container named container_name will be started. """ subprocess.check_call([ @@ -32,8 +27,6 @@ def run_systemd_image(image_name, container_name, external_port, source_path): '--privileged', '--detach', '--name', container_name, - '--publish', f'{external_port}:80', - '--mount', f'type=bind,source={source_path},target=/srv/src', image_name ]) @@ -99,7 +92,7 @@ def main(): if args.action == 'build-image': build_systemd_image(image_name, source_path) elif args.action == 'start-container': - run_systemd_image(image_name, container_name, 12000, source_path) + run_systemd_image(image_name, container_name) elif args.action == 'stop-container': remove_systemd_container(container_name) elif args.action == 'run':