0

I am using testconatiners to start a container on a Jenkins instance. Testcontainers uses the Docker Engine API to start this container. However, when it tries to do so, sending a POST request to the /containers/create endpoint, it receives the following 403 error:

{"message":"access denied:\nno access to Container Create, on collection {{SOME-UUID}}"}

Notably, it is able to pull images using the Docker HTTP V2 API, just not create containers (so far).

What could cause the above error message?

The people administrating the Jenkins instance don't know the cause, and I do not have access to the instance's configuration. If I knew why the error appears, I might be able to debug the issue further, but searching for the error yields almost no results, let alone any documentation.

Ben
  • 332
  • 3
  • 16
  • Is the token used when sending the request valid and allowed to create? – Jite Jan 31 '23 at 09:47
  • I am not sure. I haven't been able to identify any token looking at the testcontainers code. Since the setup works on Docker on my machine, I assume there must be some config on the remote Docker daemon that denies access to this endpoint. – Ben Jan 31 '23 at 10:44
  • Just to double check, the v2 API, is this the Daemon or Registry API you are talking about? – Jite Feb 01 '23 at 07:24
  • Oh, my bad, it's not the v2 API at all, it's the Docker Engine API, specifically the `/containers/create` endpoint. I'll update the question to reflect this information. – Ben Feb 01 '23 at 17:20
  • The fact that you can get the daemon to pull an image makes me a bit confused. But check if you have TLS authentication enabled in the daemon and if so, make sure you provide a valid client certificate on requests. – Jite Feb 01 '23 at 18:45

0 Answers0