no json module when running python script in docker container
Question: I'm trying to run a simple python script that takes a json string as an
argument in a docker container. However I get the following error:

    
    
    Traceback (most recent call last):
      File "/root/simple.py", line 2, in <module>
        import json
    ImportError: No module named json
    

I'm running the standard ubuntu:12.04 image. Here's how I call up the
container:

    
    
    docker run -v $(pwd)/:/root/ ubuntu:12.04 python /root/simple.py '[{"hi":"bye"}]' 
    

My `simple.py` script is just:

    
    
    import sys
    import json
    
    configs = json.loads(sys.argv[1])
    
    print configs
    
    def read_option_keys(json_file):
        json_file[0]["new"] = None
        print json.dumps(json_file)
    
    read_option_keys(configs)
    

Any idea why it's not returning the following as expected:

    
    
    [{u'hi': u'bye'}]
    [{"hi": "bye", "new": null}]
    


Answer: I was able to solve the issue myself. Ubuntu image is super bare-bones. I
pulled the `dockerfile/python` image and now it works.

