I used the below command but for some reasons, it can't find the parameter.

$ ls lachesis.ini 
$ docker run -it 5071f1ab27a0 /usr/local/bin/Lachesis lachesis.ini
RunParams is parsing INI file at lachesis.ini
ERROR: Can't find file lachesis.ini

What did I miss?

Thank you in advance,

  • 3
    At a guess, I'd say you forgot to copy the file into the container. – Michael Hampton Dec 30 '18 at 2:31

When a container runs, it runs it's own sandbox with it's own filesystem. In your example, the lachesis.ini is on your system outside of the container. You can mount locations inside of the container using the -v option for docker. Using your example, you might try something like this:

docker run -v "$PWD":/tmpdir -it 5071f1ab27a0 /usr/local/bin/Lachesis /tmpdir/lachesis.ini

This will mount your the current directory of your shell to /tmpdir inside of the container.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.