构buildMongoDB Docker镜像

遵循这个docker例子来构build并运行一个mongo数据库镜像。 但是无法build立图像。

sudo docker build --tag himanshuy/repo Usage: docker build [OPTIONS] PATH | URL | - Build a new image from the source code at PATH --force-rm=false Always remove intermediate containers, even after unsuccessful builds --no-cache=false Do not use cache when building the image --pull=false Always attempt to pull a newer version of the image -q, --quiet=false Suppress the verbose output generated by the containers --rm=true Remove intermediate containers after a successful build -t, --tag="" Repository name (and optionally a tag) to 

尝试指定Dockerfile的path(如果您已经在该文件夹中,则使用. ),如果使用-t ,则使用= with --tag或不使用它。 所以: sudo docker build -t himanshuy/repo . 或者sudo docker build --tag=himanshuy/repo .