{"id":18699850,"url":"https://github.com/lily-g1/docker-flask-demo","last_synced_at":"2026-04-11T07:43:05.256Z","repository":{"id":175050984,"uuid":"649700773","full_name":"Lily-G1/docker-flask-demo","owner":"Lily-G1","description":"Using Jenkins CI/CD to dockerize a python-flask application \u0026 push same to Dockerhub","archived":false,"fork":false,"pushed_at":"2023-07-28T18:52:56.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T02:52:20.807Z","etag":null,"topics":["ci-cd","docker","dockerhub","flask","jenkins","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lily-G1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-05T12:55:29.000Z","updated_at":"2023-07-28T19:09:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"a02e76d0-9fae-45fe-b404-8db8c6151c0d","html_url":"https://github.com/Lily-G1/docker-flask-demo","commit_stats":null,"previous_names":["lily-g1/docker-flask-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lily-G1/docker-flask-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fdocker-flask-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fdocker-flask-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fdocker-flask-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fdocker-flask-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lily-G1","download_url":"https://codeload.github.com/Lily-G1/docker-flask-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lily-G1%2Fdocker-flask-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31673067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","docker","dockerhub","flask","jenkins","python3"],"created_at":"2024-11-07T11:34:33.831Z","updated_at":"2026-04-11T07:43:05.242Z","avatar_url":"https://github.com/Lily-G1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker-Flask-Demo  \nBuilding a python-flask app image with Docker and pushing to Dockerhub using Jenkins CI/CD  \n\n![docker-flask-demo(2)](https://github.com/Lily-G1/docker-flask-demo/assets/104821662/1cb2cbdd-a345-421f-be63-9d4b4fd250c8)\n\n\n## To run/test the app manually on an ubuntu/debian server:  \n- Install python3, pip3 \u0026 flask  \n- $ git clone https://github.com/Lily-G1/docker-flask-demo/  \n- $ cd docker-flask-demo  \n- $ python3 app.py  \n- View application on localhost/IP:8080\n\n## To containerize the app using Docker:  \n- Install Docker  \n- $ cd docker-flask-demo  \n- $ docker build -t flask-app . (to build image)  \n- $ docker run -d -p 8080:8080 flask-app (to run container)  \n- $ docker stop 'container-ID' (to stop container)  \n\n## To containerize \u0026 push app to Dockerhub with Jenkins:  \n- Install Jenkins on same server. See installation guide [here](https://www.jenkins.io/doc/book/installing/linux/#debianubuntu)  \n- On the Jenkins U.I, go to Manage Jenkins -\u003e Credentials -\u003e global -\u003e Add Credentials :\n  - Kind = ‘username \u0026 password’-\u003e Enter your dockerhub account's username \u0026 password respectively  \n  - Id = ‘dockerhub’  \n  - Description = ‘dockerhub_credentials’. Save.  \n- Go to dashboard \u0026 create new item (pipeline project) -\u003e Advanced Project Options -\u003e Advanced -\u003e Display Name = ‘Docker-Flask-App’  \n- Pipeline -\u003e Pipeline SCM (enter github repo details). Save.  \n- Go to Manage Jenkins -\u003e Manage Plugins -\u003e Install ‘safe restart’ plugin  \n- On the server's command line:  \n - $ sudo usermod -a -G docker Jenkins. Log out \u0026 Log back in   (to give Jenkins access to Docker)  \n- Restart Jenkins using systemctl on the command line OR via the U.I using 'safe restart'  \n- Build project  \n- Check Dockerhub to confirm that image was pushed successfully  \n\n## Note:  \n- Edit the image name on the Jenkinsfile to your preference  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-g1%2Fdocker-flask-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flily-g1%2Fdocker-flask-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flily-g1%2Fdocker-flask-demo/lists"}