title: Create a docker image of the mongoDB- atlas version
body: <p>Hello I want to containarize my flask app and my mongo annd connect them. I have already containerize the flask app.
  my current code:</p>
  <p><strong>Dockerfile for flask container</strong></p>
  <pre><code>FROM python:3.8-buster
  WORKDIR /ergasiav3
  ADD . /ergasiav3
  RUN pip install -r requirements.txt
  CMD [&quot;python&quot;,&quot;app.py&quot;]
  </code></pre>
  <p>I have a <strong>db.py</strong> with the <strong>connection to the mongoDB</strong>, here is the code:</p>
  <pre><code>from flask_pymongo import pymongo
  
  
  CONNECTION_STRING = &quot;mongodb+srv://admin:admin@cluster0.sqowy.mongodb.net/InfoCinemas?retryWrites=true&amp;w=majority&quot;
  
  client = pymongo.MongoClient(CONNECTION_STRING)
  db = client.get_database('InfoCinemas')
  Users = pymongo.collection.Collection(db, 'Users')
  Movies = pymongo.collection.Collection(db, 'Movies')
  </code></pre>
  <p>I also created this docker-compose.yml which seems to work but I dont know how to get the mongo as an image too.</p>
  <pre><code>version: '3'
  
  services:
    infocinemas:
      build: .
      volumes:
        - ./ergasiav3
      ports:
        - 5000:5000
  </code></pre>
  <p>Do I need to make a second Dockerfile or do I just make the docker-compose.yml for the conterization of mongoDB?</p>
  <p>Thank you in advance!</p>