1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Some fixes for MongoDB example

This commit is contained in:
Tyler Brock 2013-08-21 23:48:32 -04:00
parent 0b9c8e2860
commit d6f53049c4

View file

@ -24,7 +24,7 @@ Create an empty file called ``Dockerfile``:
touch Dockerfile touch Dockerfile
Next, define the parent image you want to use to build your own image on top of. Next, define the parent image you want to use to build your own image on top of.
Here, well use `CentOS <https://index.docker.io/_/ubuntu/>`_ (tag: ``latest``) Here, well use `Ubuntu <https://index.docker.io/_/ubuntu/>`_ (tag: ``latest``)
available on the `docker index`_: available on the `docker index`_:
.. code-block:: bash .. code-block:: bash
@ -65,11 +65,14 @@ run without needing to provide a special configuration file)
# Create the MongoDB data directory # Create the MongoDB data directory
RUN mkdir -p /data/db RUN mkdir -p /data/db
Finally, we'll expose the standard port that MongoDB runs on (27107) Finally, we'll expose the standard port that MongoDB runs on (27107) as well as
add an entrypoint that runs the standard --help command by default.
.. code-block:: bash .. code-block:: bash
EXPOSE 27017 EXPOSE 27017
ENTRYPOINT [ "/usr/bin/mongod" ]
CMD [ "--help" ]
Now, lets build the image which will go through the ``Dockerfile`` we made and Now, lets build the image which will go through the ``Dockerfile`` we made and
run all of the commands. run all of the commands.