mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
ENTRYPOINT fixups
This commit is contained in:
parent
d6f53049c4
commit
f352ec945f
1 changed files with 4 additions and 5 deletions
|
@ -66,13 +66,12 @@ run without needing to provide a special configuration file)
|
||||||
RUN mkdir -p /data/db
|
RUN mkdir -p /data/db
|
||||||
|
|
||||||
Finally, we'll expose the standard port that MongoDB runs on (27107) as well as
|
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.
|
define an ENTRYPOINT for the container.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
EXPOSE 27017
|
EXPOSE 27017
|
||||||
ENTRYPOINT [ "/usr/bin/mongod" ]
|
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.
|
||||||
|
@ -87,10 +86,10 @@ the local port!
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# Regular style
|
# Regular style
|
||||||
MONGO_ID=$(docker run -d <yourname>/mongodb mongod)
|
MONGO_ID=$(docker run -d <yourname>/mongodb)
|
||||||
|
|
||||||
# Lean and mean
|
# Lean and mean
|
||||||
MONGO_ID=$(docker run -d <yourname>/mongodb mongod --noprealloc --smallfiles)
|
MONGO_ID=$(docker run -d <yourname>/mongodb --noprealloc --smallfiles)
|
||||||
|
|
||||||
# Check the logs out
|
# Check the logs out
|
||||||
docker logs $MONGO_ID
|
docker logs $MONGO_ID
|
||||||
|
|
Loading…
Reference in a new issue