Cannot create mongodb image on Docker

I’m trying to create mongodb container in Docker. First, create ubuntu container in interactive mode.

$ sudo docker run -i -t ubuntu:12.04 /bin/bash

And install mongodb

  • AWS BeanStalk environment running multi-container Docker fail to start with Health: Severe
  • How could I read the first response of the http stream request
  • Deploying Docker images from Gitlab's private Docker registry to Openshift
  • Files generated through docker-compose run web rails g controller do not have permissions to edit
  • Hitting resources in a private network from within a Docker container using VPN
  • Cannot connect to exposed Docker port
  • $ export http_proxy=xxx.xxx.xxx.xxx:xxxx
    $ export https_proxy=xxx.xxx.xxx.xxx:xxxx
    $ echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | tee /etc/apt/sources.list.d/10gen.list
    $ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
    $ apt-get update
    ...
    Get:27 http://archive.ubuntu.com precise-security/universe i386 Packages [126 kB]
    100% [Waiting for headers] 
    Err http://downloads-distro.mongodb.org dist Release.gpg                                                                                                                   
    Connection failed
    

    I also set proxy in /etc/apt/apt.conf. How can I solve this problem? I did same in my Ubuntu machine and there was no problem.

  • Why is “docker start” outputting the name of the container?
  • Connect docker container to local workbench MySQL DB
  • How to set docker mongo data volume
  • Can't reach ActiveMQ Port on Docker from my host
  • Continuous Deployment Using Travis CI and Docker
  • Running two Mysql docker containers
  • One Solution collect form web for “Cannot create mongodb image on Docker”

    Why not just pull down the mongodb image?

    docker run dockerfile/mongodb
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.