navidshaikh / introspection

Tooling to introspect container images detailing the contents and ABI properties.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introspect raised exception "introexceptions.CannotCreateContainer(msg)"

amitkrout opened this issue · comments

While running introspect on docker.io/centos exception CannotCreateContainer is raised

$ introspect docker.io/centos
Traceback (most recent call last):
  File "/usr/bin/introspect", line 123, in <module>
    main()
  File "/usr/bin/introspect", line 117, in main
    tester.run()
  File "/usr/lib/python2.7/site-packages/Introspection/test_runner.py", line 339, in run
    self._run()
  File "/usr/lib/python2.7/site-packages/Introspection/test_runner.py", line 225, in _run
    self.run_image_tests()
  File "/usr/lib/python2.7/site-packages/Introspection/test_runner.py", line 202, in run_image_tests
    self.containerutils.create_container(params)
  File "/usr/lib/python2.7/site-packages/Introspection/utils.py", line 181, in create_container
    return self.docker.create_container(params)
  File "/usr/lib/python2.7/site-packages/Introspection/dockerutils.py", line 144, in create_container
    raise introexceptions.CannotCreateContainer(msg)
Introspection.introexceptions.CannotCreateContainer: Can not create container.Command used: ['/usr/bin/docker', 'run', '--user', 'root', '-v', '/tmp/tmp1zP8CT:/var/tmp/container_introspection/:Z', '--entrypoint', '/var/tmp/container_introspection/introspection_script.sh', '--name', 'cert_womrqn', 'docker.io/centos']
Error:Unable to find image 'docker.io/centos:latest' locally
Trying to pull repository docker.io/library/centos ... latest: Pulling from library/centos
...

@navidshaikh while running introspect on running container ID it throws the similar kind of exception as above. It should be a proper message rather exception.

$ introspect c9993845ea1a
Traceback (most recent call last):
  File "/usr/bin/introspect", line 123, in <module>
    main()
  File "/usr/bin/introspect", line 117, in main
    tester.run()
  File "/usr/lib/python2.7/site-packages/Introspection/test_runner.py", line 339, in run
    self._run()
  File "/usr/lib/python2.7/site-packages/Introspection/test_runner.py", line 225, in _run
    self.run_image_tests()
  File "/usr/lib/python2.7/site-packages/Introspection/test_runner.py", line 202, in run_image_tests
    self.containerutils.create_container(params)
  File "/usr/lib/python2.7/site-packages/Introspection/utils.py", line 181, in create_container
    return self.docker.create_container(params)
  File "/usr/lib/python2.7/site-packages/Introspection/dockerutils.py", line 144, in create_container
    raise introexceptions.CannotCreateContainer(msg)
Introspection.introexceptions.CannotCreateContainer: Can not create container.Command used: ['/usr/bin/docker', 'run', '--user', 'root', '-v', '/tmp/tmpMG_SaF:/var/tmp/container_introspection/:Z', '--entrypoint', '/var/tmp/container_introspection/introspection_script.sh', '--name', 'cert_oktqou', 'c9993845ea1a']
Error:Unable to find image 'c9993845ea1a:latest' locally
Trying to pull repository registry.access.redhat.com/c9993845ea1a ... not found
Trying to pull repository docker.io/library/c9993845ea1a ... not found
Error: image library/c9993845ea1a:latest not found