From 3fe2879356d73b64842dafdb76ff3ec0e095d653 Mon Sep 17 00:00:00 2001 From: Till Maas Date: Apr 15 2019 18:09:04 +0000 Subject: docker: Do not hardcode entry point Do not hardcode an entry point because images with systemd need `/usr/sbin/init` as entry point and not `/bin/sh`. Container images can specify the entry point in the container specification (Dockerfile). If it is necessary to specify it on the command line, users can use `TEST_DOCKER_EXTRA_ARGS` to set an entry point. --- diff --git a/inventory/standard-inventory-docker b/inventory/standard-inventory-docker index bc3371d..4660bf5 100755 --- a/inventory/standard-inventory-docker +++ b/inventory/standard-inventory-docker @@ -96,9 +96,7 @@ def inv_host(subject, docker_extra_args): # And launch the actual container cmd = [ "/usr/bin/docker", "run", "--detach", "--cidfile={0}".format(cidfile), - ] + extra_arg_list + [ - "--entrypoint=/bin/sh", image, "-c", "sleep 1000000" - ] + ] + extra_arg_list + [image, "-c", "sleep 1000000"] try: subprocess.check_call(cmd, stdout=sys.stderr.fileno()) except subprocess.CalledProcessError: