Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom mongodb docker image for tutorial #383

Closed
itamarst opened this issue Jul 29, 2014 · 10 comments
Closed

Custom mongodb docker image for tutorial #383

itamarst opened this issue Jul 29, 2014 · 10 comments

Comments

@itamarst
Copy link
Contributor

Default one we're using isn't very good:

  1. Huge download, slowing down tutorial setup.
  2. Requires lots of disk space to run (mongod needs to be run with --noprealloc --smallfiles to fix this). I have workaround for this in Worked out example: a publicly facing data-storing application moves across nodes #131 but it isn't great insofar as the resulting image is local only and can't be downloaded outside the vagrant env.

http://blog.docker.com/2013/06/create-light-weight-docker-containers-buildroot/ is a possible technique to try.

@itamarst itamarst added this to the Release 0.1 milestone Jul 30, 2014
@itamarst itamarst added ready and removed ready labels Jul 30, 2014
@dwgebler dwgebler self-assigned this Jul 31, 2014
@dwgebler
Copy link
Contributor

I am currently attempting to build a new image along the lines of the link above...

@itamarst
Copy link
Contributor Author

itamarst commented Aug 6, 2014

How is it going? If this is still not done maybe pair with someone e.g. @robhaswell .

@dwgebler
Copy link
Contributor

dwgebler commented Aug 6, 2014

@itamarst almost done, got mongod running in a container whose image is only 35MB.
Just figuring out one last issue with the Dockerfile so that running the container automatically starts the daemon.

@dwgebler
Copy link
Contributor

dwgebler commented Aug 7, 2014

How do we want to go about deploying this, now we have a lightweight image available in the issue branch?

In the tutorial Vagrantfile we have a section:

TAR="/tmp/vagrant-cache/dockerfile_mongodb.tar"
IMAGE="dockerfile/mongodb"
# Get the images needed for the tutorial.  This has to happen eventually and
# doing it now aggregates all of the waiting in one place.
if [ -e "${TAR}" ]; then
  # Load a cached version.
  docker load < "${TAR}"
else
  # Get it from the internet.
  docker pull "${IMAGE}"
  # Cache it if possible
  if [ -d /tmp/vagrant-cache ]; then
    docker save "${IMAGE}" > "${TAR}"
  fi
fi

We either need to deploy to the public Docker registry, create a private registry (I think this option is quite a bit of work and may be tricky) or include a TAR (~34MB) that people download off our docs site as part of the tutorial process, with the Vagrantfile then being modified to just use docker load on that file.

@robhaswell
Copy link
Contributor

I have publicised the docker image: https://registry.hub.docker.com/u/clusterhq/mongodb/

@tomprince
Copy link
Contributor

We should cache the image on our base image.

@itamarst
Copy link
Contributor Author

Fixed by #476.

@johnlonganecker
Copy link

So you guys made your own custom mongo images. Is there anyway we can add some other version tags to this image on docker hub?

@itamarst
Copy link
Contributor Author

itamarst commented Mar 5, 2015

Hi,

This image is mostly for demo purposes. Any reason you can't use the official image?

@wayneeseguin
Copy link

@itamarst When we try to run the official docker hub mongo 2.6.7 and 2.6.6 they fail to run when deployed via Flocker so we are looking into what you guys did differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants