Building the MongoDB Docker image

Following this docker example to build and run a mongo db image.
But not able to build the image.

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

  • Print timestamps in Docker Compose logs
  • gcloud docker — push vertificate error
  • Error when running jekyll docker container with boot2docker on Mac
  • Unknown filesystem type on /dev/mapper/docker-202
  • How to search for an docker image in multiple private registries
  • Ansible won't let me connect through SSH
  • Docker Cloud Wordpress stack workflow optimization
  • WSO2 : how to download products in a Dockerfile?
  • Specify requested resource for running a docker app over Mesos
  • Docker, How can I locate the image files after pulling [duplicate]
  • Ubuntu 14.04: Upgrade to php7 and uninstall php5?
  • Docker : How to change the location of directory images in Docker?
  • One Solution collect form web for “Building the MongoDB Docker image”

    Try specifying the path to your Dockerfile (use . if you already are in that folder) and using = with --tag or without it if you use -t; so:
    sudo docker build -t himanshuy/repo . or
    sudo docker build --tag=himanshuy/repo .

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.