Dockerfile and container does not work. Python Program

I have been attempting to deploy a docker image onto Ubuntu 18.04. The program itself runs without issue outside of Docker. However, when I build the docker image on Ubuntu 18.04 and then attempt to run it, it does not work as intended.

Here is my dockerfile.

FROM python:3
WORKDIR /EmailForwarding
COPY . .
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt
RUN pip3 install google-api-python-client
RUN pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib

CMD ["python3", "EmailForwardingMain.py"]

Source: StackOverflow