Closed pogilon closed 7 years ago
@connormanning maybe there is a problem in the way I am defining the "/path/to/config/file". I also tried "sudo docker run -it -p 8080:8080 -v ~/greyhound:/greyhound connormanning/greyhound -c /path/to/config/file/" without luck
@connormanning I have rechecked the path many times :(
A little confused. Can you tell me:
@connormanning
The exact docker command I was using was: "sudo docker run -it -p 8080:8080 -v ~/greyhound:/greyhound connormanning/greyhound -c ~/Documents/config.json"
and the configuration file is located in "~/Documents/config.json" in the local hard drive. I believe I may have a misunderstanding of how the docker volumes work. Thanks!
Yeah looks like a volume mapping issue. Since you've only mapped ~/greyhound
from your local drive, that's all that's accessible within docker. So you'll need to map ~/Documents
as well, and then refer to your mapping within docker. Try this:
sudo docker run -it -p 8080:8080 -v ~/greyhound:/greyhound -v ~/Documents:/opt/documents connormanning/greyhound -c /opt/documents/config.json
@connormanning thank you, perfect!
Hello,
I am received the error below when trying to use a config.json file using the command "sudo docker run -it -p 8088:8080 connormanning/greyhound -c /path/to/config/file". What do you think could be the problem? Thanks!
LOG Using config at /path/to/config/file fs.js:549 return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); ^
Error: ENOENT: no such file or directory, open '/path/to/config/file' at Error (native) at Object.fs.openSync (fs.js:549:18) at Object.fs.readFileSync (fs.js:397:15) at Object. (/usr/lib/node_modules/greyhound-server/src/app.js:26:35)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3
Relaunching greyhound