Skip to content

Commit e9844c4

Browse files
author
Dave
authored
DOCSP-21776 Update for docker image (#983)
1 parent 551dbf5 commit e9844c4

File tree

2 files changed

+65
-50
lines changed

2 files changed

+65
-50
lines changed
Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
title: Download the Docker build files for MongoDB Enterprise.
22
stepnum: 1
3-
level: 5
3+
level: 4
44
ref: download
55
pre: |
6-
After you have installed
7-
`Docker <https://docs.docker.com/install/>`__ and set up a
8-
`Docker Hub <https://hub.docker.com/>`__ account, download
9-
the build files from the
10-
`Docker Hub mongo project <https://github.com/docker-library/mongo>`__
11-
with the following commands. Set ``MONGODB_VERSION`` to your major
12-
version of choice.
136
14-
.. note:: Docker Hub Mongo Project
7+
Set ``MONGODB_VERSION`` to a MongoDB major version:
158
9+
.. code-block:: bash
10+
11+
export MONGODB_VERSION=5.0
1612
17-
The Docker Hub mongo project is *not* maintained by MongoDB. Any support
18-
requests should go to `Docker <https://github.com/docker-library/mongo>`__.
13+
Download the build files from the `Docker Hub mongo
14+
project <https://github.com/docker-library/mongo>`__:
1915
2016
.. code-block:: bash
2117
22-
export MONGODB_VERSION=4.0
2318
curl -O --remote-name-all https://raw.githubusercontent.com/docker-library/mongo/master/$MONGODB_VERSION/{Dockerfile,docker-entrypoint.sh}
2419
2520
---
2621
title: Build the Docker container.
2722
stepnum: 2
28-
level: 5
23+
level: 4
2924
ref: docker-container
3025
pre: |
3126
Use the downloaded build files to create a Docker container image wrapped around
@@ -40,33 +35,51 @@ pre: |
4035
---
4136
title: Verify the build results.
4237
stepnum: 3
43-
level: 5
38+
level: 4
4439
ref: verify-build
4540
pre: |
46-
Verify that the build was created.
41+
Verify that the image was created:
4742
4843
.. code-block:: bash
4944
5045
docker images $DOCKER_USERNAME/mongo-enterprise:$MONGODB_VERSION
5146
52-
The output should resemble this:
47+
The output should resemble:
5348
5449
.. code-block:: bash
5550
56-
REPOSITORY TAG IMAGE ID CREATED SIZE
57-
username/mongo-enterprise 4.0 397f0a16010a 31 seconds ago 465MB
51+
REPOSITORY TAG IMAGE ID CREATED SIZE
52+
username/mongo-enterprise 5.0 bf82d2c5f58d 19 seconds ago 952MB
53+
54+
---
5855
title: Test your image.
59-
stepnum: 3
60-
level: 5
56+
stepnum: 4
57+
level: 4
6158
ref: test-build
6259
pre: |
63-
The following commands run mongod locally in a Docker container and check
64-
the version.
60+
The following commands:
61+
62+
- Run a container using the ``mongo-enterprise`` Docker image.
63+
- Run :binary:`mongosh` inside the container to verify the MongoDB version.
6564
6665
.. code-block:: bash
6766
68-
docker run --name mymongo -itd $DOCKER_USERNAME/mongo-enterprise:$MONGODB_VERSION
69-
docker exec -it mymongo /usr/bin/mongo --eval "db.version()"
67+
docker run --name mongoEnt -itd $DOCKER_USERNAME/mongo-enterprise:$MONGODB_VERSION
68+
docker exec -it mongoEnt /usr/bin/mongosh --eval "db.version()" | grep "Using Mongo"
69+
70+
The output should resemble:
71+
72+
.. code-block:: bash
73+
:copyable: false
74+
75+
60fbcf88c855e9ae41210422a083314b21a42661a28d970a078ea08ab8bcb06d
76+
Using MongoDB: 5.0.7
77+
Using Mongosh: 1.3.1
78+
79+
The displayed values are the:
80+
81+
- container ID
82+
- MongoDB server version
83+
- :binary:`mongosh` version
7084
71-
This should output the shell and server version for MongoDB.
7285
...

source/tutorial/install-mongodb-enterprise-with-docker.txt

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,48 @@ Install MongoDB Enterprise with Docker
1313

1414
- For development and testing use the
1515
`MongoDB Community Docker container <https://hub.docker.com/_/mongo/>`__.
16+
This image is supported by MongoDB. The image contains the
17+
Community Edition of MongoDB.
1618

17-
- For MongoDB Enterprise production installations use Kubernetes through the
18-
:opsmgr:`MongoDB Ops Manager </tutorial/install-k8s-operator>`.
19+
- For MongoDB Enterprise production installations, use
20+
:opsmgr:`MongoDB Ops Manager </tutorial/install-k8s-operator>` to
21+
configure Docker containers and Kubernetes.
1922

20-
.. note::
21-
22-
This procedure uses Docker's official `mongo image
23-
<https://github.com/docker-library/mongo>`__, which is supported by
24-
the Docker community and *not* MongoDB.
25-
26-
If the above recommended solutions do not satisfy your needs,
27-
follow the steps in this tutorial to manually install
28-
:products:`MongoDB Enterprise </mongodb-enterprise-advanced?tck=docs_server>` with
29-
Docker.
23+
To manually configure :products:`MongoDB Enterprise
24+
</mongodb-enterprise-advanced?tck=docs_server>` with Docker, follow the
25+
instructions on this page.
3026

3127
Considerations
3228
--------------
3329

34-
A full description of `Docker <https://docs.docker.com/>`__ is beyond the scope
35-
of this documentation. This page assumes prior knowledge of Docker.
30+
A full description of `Docker <https://docs.docker.com/>`__ is beyond
31+
the scope of this documentation. This page assumes prior knowledge of
32+
Docker.
3633

37-
This documentation only describes installing MongoDB Enterprise with Docker,
38-
and does not replace other resources on Docker. We encourage you to thoroughly
39-
familiarize yourself with Docker and its related subject matter before
40-
installing MongoDB Enterprise with Docker.
34+
This documentation only describes installing MongoDB Enterprise with
35+
Docker, and does not replace other resources on Docker. We encourage
36+
you to thoroughly familiarize yourself with Docker and its related
37+
subject matter before installing MongoDB Enterprise with Docker.
4138

4239
.. important::
4340

44-
This procedure uses Docker's official `mongo image
45-
<https://github.com/docker-library/mongo>`__, which is supported by
46-
the Docker community and *not* MongoDB. It supports only the major
47-
versions listed in their `repositiory
48-
<https://github.com/docker-library/mongo>`__, and only a specific
49-
minor version for each major version. The minor version can be found
50-
in the ``Dockerfile`` in the folder for each major version.
41+
This procedure uses the official `mongo image
42+
<https://github.com/docker-library/mongo>`__. The image is supported
43+
by MongoDB.
44+
45+
The MongoDB community may contribute additional container images.
46+
For a listing of all available images, see the `repositiory
47+
<https://github.com/docker-library/mongo>`__.
5148

5249
.. _create-docker-image-enterprise:
5350

5451
Create a Docker Image with MongoDB Enterprise
5552
---------------------------------------------
5653

54+
Install `Docker <https://docs.docker.com/install/>`__ and set up a
55+
`Docker Hub <https://hub.docker.com/>`__ account before creating a
56+
MongoDB Enterprise Docker image.
57+
5758
.. include:: /includes/steps/install-mongodb-enterprise-with-docker.rst
5859

5960
Push the Image to Docker Hub
@@ -67,3 +68,4 @@ on using ``docker pull``, reference its documentation
6768
`here <https://docs.docker.com/engine/reference/commandline/pull/#examples>`__.
6869

6970
.. include:: /includes/steps/push-mongodb-with-docker-to-hub.rst
71+

0 commit comments

Comments
 (0)