Ignore Files While Building

Create File Called .dockerignore

touch .dockerignore

Add File Contents

# Ignore any file called .git
.git

# Ignore any file with a .ipynb extension
*.ipynb

# Except don't ignore important_analysis.ipynb
!important_analysis.ipynb

# Ignore every file and folder in secret_project/ directory
secret_project/

Any Docker build in the directory with the .dockerignore file will follow rules declared above.