Sign inSign up

zokeber/mongodb

By zokeber

Updated almost 11 years ago

MongoDB Dockerfile in CentOS 7

Image
2

10K+

zokeber/mongodb repository overview

MongoDB Dockerfile in CentOS 7

This repository contains a Dockerfile to build a Docker Image for MongoDB in CentOS 7.

Base Docker Image

Usage

Installation
  1. Install Docker.

  2. You can download automated build from public Docker Hub Registry:

docker pull zokeber/mongodb:latest

Another way: build from Github

To create the image zokeber/mongodb, clone this repository and execute the following command on the docker-mongodb folder:

docker build -t zokeber/mongodb:latest .

Another alternatively, you can build an image directly from Github:

docker build -t="zokeber/mongodb:latest" github.com/zokeber/docker-mongodb

Create and running a container

Create container:

docker create -it -p 27017:27017 --name mongodb zokeber/mongodb

Start container:

docker start mongodb
Connection methods:

Mongo interactive shell:

docker exec -it mongodb mongo

Bash:

docker exec -it mongodb bash

Upgrading

Stop the currently running image:

docker stop mongodb

Update the docker image:

docker pull zokeber/mongodb:latest

Tag summary

Content type

Image

Digest

sha256:ddb2a4be8

Size

343 MB

Last updated

almost 11 years ago

docker pull zokeber/mongodb