How to correctly debug gcloud flask docker before publish?

I am trying deploy my flask website following these tutorials
Flask + Firebase
Flask + Firestore.

This is the project, and Dockerfile I have built so far

├── page
│   ├── __init__.py
│   ├── api
│   │   ├── __init__.py
│   │   ├── chromedriver
│   │   ├── credentials.json
│   │   ├── pages.py
│   │   └── token.pickle
│   ├── common.py
│   ├── data
│   │   ├── problems.json
│   │   └── users.json
│   ├── forms.py
│   ├── main.py
│   ├── routes.py
│   ├── static
│   │   ├── 404.html
│   │   ├── font
│   │   │   ├── NanumSquare_acL.ttf
│   │   │   └── NanumSquare_acR.ttf
│   │   └── main.css
│   ├── templates
│   │   ├── admin.html
│   │   ├── index.html
│   │   └── signin.html
│   └── user.py
└── Dockerfile

FROM python:3.7

RUN pip install Flask gunicorn requests oauthlib ...

COPY page/ /page

ENV PORT 8080
ENV PYTHONPATH /page

CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 page.main:app

But I am constantly having issue with docker, such as python packages, python path, and so on.

So before I publish my docker, I decided to debug using following command

docker build --pull --rm -f "Dockerfile" -t page:latest "."
page:latest

docker run --rm -it  page:latest

But unlike other images, it starts python program right away, so I cannot test any bash commands.

Is there any easy way that I can

  • create empty python docker
  • install packages, configure path within docker
  • save into Dockerfile?
  • Is it safe to put my credential files (credentials.json) as it is?

Source: Docker Questions