Closed mrsharm closed 3 months ago
We'll need a comment in the docs to explain that in docker the destination path is the final destination in the container.
@mrsharm do you want to merge this PR or are you waiting to add some more things?
Thanks - sorry for the delay. Merged now.
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](https://github.com/dotnet/crank/assets/68247673/ac0f5a7b-9e19-4766-9fb5-c84cfd3a5b77)
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](https://github.com/dotnet/crank/assets/68247673/b15014e4-934d-48e7-9fb9-5514050648ef)