python - Error adding local file to docker image with docker-py -


i have been working docker-py, in order build images , launch containers in 1 script. far has been smooth. however, having issues add/copy commands in dockerfile string variable.

i need add file source directory directly image. standard dockerfiles, have been able achieve successfully, using docker add command. using docker-py, throws exception:

exception: error building docker image: lstat simrun.py: no such file or directory 

the script simrun.py stored in same directory docker-py script, cannot understand why receiving exception. relative line in dockerpy.py is:

 add ./simrun.py /opt 

is there i've missed, or functionality not work in docker-py yet?

you need set path in docker build context using path parameter.

see here


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -