It's pretty simple, you fork the repository. then build, test and publish
Install Python3 installation package
Install docker
- Clone the repo
git clone git@github.com:wasabibob/demo-py-app- Run docker build
cd demo-py-app docker build .
- Make note of the image sha or image id from the output of your build
eg. sha256:6dcb511f99a9e755e8c27b833739f38180ab79e329860fa0432c25ba0ca9be25
Run the built image in docker on in your local environment from the terminal window or from docker desktop application
Once running, you can see the app by opening a browser and browsing to localhost:5500
From the application source home directory (demo-py-app)
docker run -it -p 5500:5000 <Image ID>- Navigate to images tab and locate your most recent build (typicaly at the bottom of the list)
- Click on the play/run button under the Actions column
- In the Run a new container diaglog box, under Optional setting, replace Host port with the value 5500
- Click Run
- Tests are functions defined in the tests.py file
- These will automatically run as part of the GitHub Actions Workflow which is found in the .github/workflows folder
- To run the workflow, simply commit a change to your GitHub repsoitory, this will start the GitHub Actions Workflow
- In your browser, navigate to your GitHub repository and slect the Actions tab
- Click on the most recent workflow (named after your recent commit)
- In the docker-image.yaml workflow select the docker run to see the test results as part of the workflow output