1

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

$ ls lachesis.ini 
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,

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
user977828
  • 225
  • 1
  • 6
  • 15

1 Answers1

1

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.

jordanm
  • 889
  • 5
  • 9