3

I want to run a docker with mounting a host directory. The command is like this "docker run -it -v /hostdata:/data /bin/echo hello world". So, I'd like to know the sequence of option "-v /hostdata:/data " and "/bin/echo hello" command. That docker command will execute "/bin/echo hello" firstly? Or execute "-v /hostdata:/data" firstly? Please ignore my English grammar.Thanks.

David
  • 33
  • 4

1 Answers1

1

Mounts are first, then the container is "booted" and the docker CMD / ENTRYPOINT commands are run

Eugen Mayer
  • 8,942
  • 4
  • 33
  • 57