Never use docker commit. docker build is more reproducible, and there are a couple of actions (like setting CMD and ENTRYPOINT) that are important and difficult to do via docker commit.
(If you start with docker commit, you’ll eventually get to a point where you need to update the image, and wish you had written down the commands you had run to build the image originally…which is just a Dockerfile.)
Your two paths look like they should probably be close to equivalent, and I’m not sure why (or how) your committed image doesn’t work, but since your docker build path does work, I’d just stick with that and not worry too much about it.
Thanks for answer,
There is strange especially because committed system works fine when i started it in interactive mode (–it /bin/bash)
And i have to start mongod manually …