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

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -