Open
Description
I have spent several hours trying to get the following example working
import docker
client = docker.from_env()
# using a list of image strings formatted "<registry>:<image>:<tag>"
for image in images:
container_id = client.containers.create(image)
This results with the following error:
ERROR - 400 Client Error for http+docker://localhost/v1.48/containers/create: Bad Request ("invalid reference format")
but if I put the exact image string in place of the variable image
in the above client.containers.create(image)
then it works fine.
I need to be able to iterate through images for my purpose and it seems funny that I have to hard code the parameters used by API?
Any help or advice is appreciated, if this is currently possible
Metadata
Metadata
Assignees
Labels
No labels