Welcome back! Now that your Flask application is running locally, it’s time to containerize it with Docker and push your code to GitHub. This guide walks you through creating a Dockerfile, staging and committing changes, working with feature branches, and opening a pull request.Documentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
Preparing the Dockerfile
In VS Code (or your preferred editor), create a file namedDockerfile in your project root:
Use
--no-cache-dir with pip to reduce image size by preventing caching of package files.Staging and Committing Changes
Once yourDockerfile, app.py, requirements.txt, and README.md are ready, stage all modified and new files:
main branch:
Make sure sensitive files (e.g.,
.env, keys) are listed in your .gitignore to avoid accidental commits.Branching and Pushing Feature Branch
Follow Git best practices by working in a feature branch named after your JIRA task:- Create and switch to the branch:
- Push the branch to GitHub:
| Command | Description |
|---|---|
git checkout -b <branch-name> | Create & switch to a new feature branch |
git push origin <branch-name> | Push local branch to remote repository |
git add . | Stage all changes |
git commit -m "<message>" | Commit staged changes with a message |
Opening a Pull Request
- Navigate to your GitHub repository in a browser.
- Click Compare & pull request for
sprint-01/jira-id-0202. - Add a title and paste your commit message in the description.
- Assign a reviewer from your team.

main and pull the latest changes:
main branch now contains the merged feature.