Writing to a file inside a container

  docker, python

I have a Python script which runs a query and prints the output to a text file. When I Dockerize it the output file is not getting created. The Dockerfile is as follows:

FROM python:3
ADD cert_lamp.py /
ADD certificates.txt /
RUN pip install pyOpenSSL
RUN pip install numpy
RUN pip install cryptography
RUN pip install idna
CMD [ "python", "./cert_lamp.py" ]

cert.txt is the file where I need the output to be added. This is referenced in the script. How do I add this to the Dockerfile?

Source: Docker Questions