Docker Community Forums

Share and learn in the Docker community.

Error while building docker image through docker python api var/lib/docker/tmp/docker-builderxxxxxxxxx


(Dipesh017) #1

Hello there,
While building docker image through docker python api I stuck in an error.
I am trying to COPY a file from local to container image.
ADD supervisor.conf /etc/

It worked completely fine without using docker python api.
While python it automatically add a path var/lib/docker/tmp/docker-builderxxxxxxxxx in front of given path and then result in a output no such file or directory found.’

I am building using -

cli = Client(base_url=‘unix://var/run/docker.sock’)
response = [line for line in cli.build(fileobj=f, rm=True, tag=fullImageName)]