I'm using the
Docker
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? Cheers