crank icon indicating copy to clipboard operation
crank copied to clipboard

Copy Files to Docker

Open mrsharm opened this issue 1 year ago • 1 comments

This PR implements the functionality of copying files to a docker container. Changes required to the current implementation include to create, copy the attached files and then start rather than simply running the container.

One caveat here was that the destination path should be the folder name where the files must go rather than the path to the files themselves (CC: @sebastienros). For example:

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/containers.benchmarks.yml --scenario json_aspnet_current --profile local --profile noload --application.options.outputFiles "./docs/development.md;app/development.md"

doesn't work as it leads to the filename as: app\development.md\development.md image

Also, quotations around the source;[destination] are necessary unlike the typical case of simply uploading a file.

NOTE: The following uploads the file to the / folder:

crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/containers.benchmarks.yml --scenario json_aspnet_current --profile local --profile noload --application.options.outputFiles ./docs/development.md.

Testing

Run from the crank folder: crank --config https://raw.githubusercontent.com/aspnet/Benchmarks/main/scenarios/containers.benchmarks.yml --scenario json_aspnet_current --profile local --profile noload --application.options.outputFiles "./docs/*;app/"

Copied all the md files in doc folder to the container: image

mrsharm avatar Mar 31 '24 09:03 mrsharm

We'll need a comment in the docs to explain that in docker the destination path is the final destination in the container.

sebastienros avatar Apr 23 '24 22:04 sebastienros

@mrsharm do you want to merge this PR or are you waiting to add some more things?

sebastienros avatar May 13 '24 22:05 sebastienros

Thanks - sorry for the delay. Merged now.

mrsharm avatar May 17 '24 19:05 mrsharm