Open patrocinio opened 7 years ago
I get the following whether I specify the path or cd into scripts:
sh: 0: Can't open load-data.sh (or ./load-data.sh, or scripts/load-data.sh)
I've now recreated this on 2 diff windows 7 docker platforms as well as 2 diff (one from the ground up) xubuntu VMs.
Ok, finally solved this for both xubuntu & Win7 64 bit (docker toolkit).
On my clean xubuntu image. The steps are likely correct - though I think the following is important:
- when you issue the 'run' command, make sure you're in the `refarch-cloudnative` dir (because of this bit here "...-v $PWD/scripts:/home/scripts -p ..." from the original run cmd.
- use this command when running the load script (note the `./`):
`docker exec -it mysql sh ./load-data.sh`
...as the /home/scripts is not in the mysql container's path.
For the docker toolbox (on Win7 64bit) version, everything above is true but also:
- since I'm running in the docker quick start terminal, I needed to use the linux version. The docker terminal does not recognize %CD%.
- lastly, not sure if this is something I'm doing wrong, but I had to (in notepad++) convert the load-data.sh script to use unix EOLs.
Hope this helps someone else. And wish there was a user2user forum somewhere for this sort of information....
Step 3 says
docker exec -it mysql sh load-data.sh
The script is in the scripts/, so the instructions should say
cd scripts
or sh scripts/load-data.sh
Thanks!