From e413901667e288b677f01b916f13205beae67ecb Mon Sep 17 00:00:00 2001 From: trishnaguha Date: Wed, 5 Oct 2016 14:34:05 +0530 Subject: [PATCH] Add atomic run ability to mongodb container --- mongodb/Dockerfile | 3 +++ mongodb/README.md | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/mongodb/Dockerfile b/mongodb/Dockerfile index 05830a2b..eb75d8fa 100644 --- a/mongodb/Dockerfile +++ b/mongodb/Dockerfile @@ -1,6 +1,9 @@ FROM fedora MAINTAINER http://fedoraproject.org/wiki/Cloud +# This Label is to run the image with atomic command +LABEL RUN='docker run -d -p 27017 $IMAGE' + RUN dnf -y update && dnf clean all # List of packages that may be needed while troubleshooting, including the MongoDB client. Only uncomment this line if you need the MongoDB client while inside the container. diff --git a/mongodb/README.md b/mongodb/README.md index f004e283..3b5ba93f 100644 --- a/mongodb/README.md +++ b/mongodb/README.md @@ -11,11 +11,17 @@ To build: Copy the sources down - - # docker build --rm -t /mongo . + # docker build --rm -t fedora/mongo . To run: - # docker run -d -p 27017 /mongo +On Atomic host: + + # atomic run fedora/mongo + +On Non-Atomic host: + + # docker run -d -p 27017 fedora/mongo Watch for the database to initialize and start listening (using the container ID from "docker run":