Dolor Oculus
01/12/2021, 2:08 PMDocker
flow storage with base_image
, and need to add a file to the image which can only be determined at registration time (flow.storage assignment). I've tried various combinations of build_kwargs
and extra_dockerfile_commands
but am not having any luck. Would appreciate any feedback or pointers!
my_new_file = "/valid/path/to/file.json"
flow.storage = Docker(
base_image=valid_image_name,
local_image=True,
ignore_healthchecks=True,
build_kwargs={'my_new_file': my_new_file},
extra_dockerfile_commands=['ARG my_new_file',
'COPY $my_new_file .'])
Once it gets to the COPY command I get the error
COPY failed: stat /data/docker/tmp/docker-builder092360870/valid/path/to/file.json: no such file or directory
I've also tried just the basename of the file as input into the build_kwargs, with no avail. How do I get a file into that temporary docker builder dir? CheersVincent
01/12/2021, 2:58 PMfiles
kwarg in the Docker object constructor?Dolor Oculus
01/12/2021, 3:20 PMVincent
01/12/2021, 3:56 PMfiles
kwarg where I provide a dictionary of source and target locations. ie.
"/home/user/file":"/inputs/file"
Where the new file location is explicitly set.Dolor Oculus
01/12/2021, 4:06 PM