构建MongoDB Docker镜像

时间:2015-01-16 21:29:04

标签: mongodb docker

在此docker example之后构建并运行mongo db映像。 但无法构建图像。

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

1 个答案:

答案 0 :(得分:4)

尝试指定Dockerfile的路径(如果您已在该文件夹中,请使用.)并使用=--tag一起使用,如果您使用-t则不使用sudo docker build -t himanshuy/repo .;所以: sudo docker build --tag=himanshuy/repo .或 {{1}}