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

**URL:** <https://forums.docker.com/t/error-while-building-docker-image-through-docker-python-api-var-lib-docker-tmp-docker-builderxxxxxxxxx/52749>\
**Category:** General\
**Created:** [June 21, 2018, 7:43am UTC](https://forums.docker.com/t/error-while-building-docker-image-through-docker-python-api-var-lib-docker-tmp-docker-builderxxxxxxxxx/52749 "2018-06-21T07:43:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dipesh017](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@dipesh017](https://forums.docker.com/u/dipesh017)\
**Post date:** [June 21, 2018, 7:43am UTC](https://forums.docker.com/t/error-while-building-docker-image-through-docker-python-api-var-lib-docker-tmp-docker-builderxxxxxxxxx/52749/1 "2018-06-21T07:43:03Z")

</div>

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)]
