{"id":19855416,"url":"https://github.com/gtesei/patterns_for_continuous_integration_docker_travis_ci_1","last_synced_at":"2026-06-14T10:32:26.095Z","repository":{"id":71994715,"uuid":"151777692","full_name":"gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_1","owner":"gtesei","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-23T17:20:08.000Z","size":213,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T23:42:52.518Z","etag":null,"topics":["containers","continuous-integration","docker","travis-ci"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/gtesei.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":"2018-10-05T21:02:13.000Z","updated_at":"2018-10-23T17:20:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba407ce4-8efa-45b3-8204-760a4c384e17","html_url":"https://github.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gtesei","download_url":"https://codeload.github.com/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gtesei%2FPatterns_for_Continuous_Integration_Docker_Travis_CI_1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34318523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"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":["containers","continuous-integration","docker","travis-ci"],"created_at":"2024-11-12T14:12:40.615Z","updated_at":"2026-06-14T10:32:26.074Z","avatar_url":"https://github.com/gtesei.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Patterns for Continuous Integration with Docker using Travis CI 1 \n\n__Full story:__ [Patterns of Continuous Integration for Data Science Python Projects](https://medium.com/@gtesei/the-ci-arsenal-that-any-open-source-machine-learning-python-project-should-consider-e34759dd66c4)\n\n__Full story:__ [Patterns of Continuous Integration for Data Science Python Projects](https://medium.com/@gtesei/the-ci-arsenal-that-any-open-source-machine-learning-python-project-should-consider-e34759dd66c4)\n\n[![Build Status](https://api.travis-ci.org/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_1.svg?branch=master)](https://travis-ci.org/gtesei/Patterns_for_Continuous_Integration_Docker_Travis_CI_1)\n\n![Conceptual Schema](./img/part_1.png)\n\n__GOAL__: for each commit on the _master branch_ we want to build a Docker image according to a given Dockerfile and push it on Docker Hub (or different Docker Registry) using Travis CI.\n\n## Dockerfile \n\n```docker\nFROM debian\nRUN apt-get update \\\n    \u0026\u0026 apt-get install -y --no-install-recommends cowsay \\\n    \u0026\u0026 rm -rf /var/lib/apt/lists/*\nENV PATH \"$PATH:/usr/games\"\n\nENTRYPOINT [\"cowsay\"]\nCMD [\"Hello, World!\"]\n```\n\n## .travis.yml  \n\n\n```yml\nsudo: required\nservices:\n- docker\nenv:\n  global:\n  - REGISTRY_USER=gtesei\n  - secret: \"\u003csomething long\u003e\"\n  - secure: W8cjk1MzKPXbs+u1PVlP1WPyKOKon0PEeVSf790tV6VtOlExRAK3NPEyFzZ3jjkTsenB/sspBawIJlqjPBQAqeeGz2I7vwWRj1UxawbmHaxaodoclMx3APbg8iW/+qH4bm0M2uyb9F6JWY8azD/j7GKIW8otyIb8s+9qu+wFR9HMuxFuvy8MPABgTk3r6/qflSwWd0QZkia3UqAauFAHCtxTZSwBWz0kL4XBgBEcArVU+1tu6rhOPWsm+CEcxf3WwjCYHdemp5MffC1hWvzgffVWuuFb7Y7ICCCVjaNQ8jgbtJ4HzoFW3vpocRJk7nJiWzTNwXbzqLfreApPEI5ADQqpBczJw23oDG42MiFTurdIXKghzgHo79tDG6ezGRWCkiutcWPu7mgYbWX6og966IboMAOh7aO4zBJY77xkDNYT1YWcrKF3P6Chk7roaGEUJGtZsz/osKzT+XSVdmgOKeQt2fawFlEd7DWAnoDrJwcOWq4NGobR46llQ8YJHHjObS5wzr/ktLvoURDNzTi3RjE4N3nQZvOu57GDcrQ7bkz4if+KNShnkvKg+4DAryB6sSvFaIAtkZmDN1Jf3EgO9eVAKmgGm3AVLzzKsI5NWVIbYqs4Ixp6tFeQ6WF5ad9oeyTVWlov7cDvQclgq0ineO7vgpS5VfqgJQZ6cb92kBg=\nbefore_script:\n- docker pull myorg/myimage || true\nscript:\n- docker build --pull --cache-from gtesei/hello_travis --tag gtesei/hello_travis .\n- docker run gtesei/hello_travis\nafter_script:\n- docker images\nbefore_deploy:\n- docker login -u \"$REGISTRY_USER\" -p \"$REGISTRY_PASS\"\ndeploy:\n  provider: script\n  script: docker push gtesei/hello_travis\n  on:\n    branch: master\n```\n\n### How to encrypt password of Docker Hub on .travis.yml \n\n![Howto Encrypt Password](./img/pwd_enc.PNG)\n\n## For each commit on master branch Travis CI builds a new Docker image ...   \n\n![Travis CI](./img/trav_1.PNG)\n\n![Travis CI](./img/trav_2.PNG)\n\n## ... and pushes it on Docker Hub (or different Docker Registry)\n\n![Docker Hub](./img/dock_1.PNG)\n\n## Useful links  \n\n[Ruby Installer for Windows](https://rubyinstaller.org/downloads/)\n\n__To install Travis__ \n```ruby \ngem install travis\n```\n## Credits \n\n[Coding Tips: Patterns for Continuous Integration with Docker on Travis CI](https://medium.com/mobileforgood/coding-tips-patterns-for-continuous-integration-with-docker-on-travis-ci-9cedb8348a62)\n\n[Defining encrypted variables in .travis.yml](https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml)\n\n[Google Cloud | Continuous Delivery with Travis CI](https://cloud.google.com/solutions/continuous-delivery-with-travis-ci)\n\n[Continuous Integration. CircleCI vs Travis CI vs Jenkins](https://hackernoon.com/continuous-integration-circleci-vs-travis-ci-vs-jenkins-41a1c2bd95f5)\n\n[Continuous Integration with Jenkins and Docker](https://code-maze.com/ci-jenkins-docker/) \n\n+/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtesei%2Fpatterns_for_continuous_integration_docker_travis_ci_1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgtesei%2Fpatterns_for_continuous_integration_docker_travis_ci_1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgtesei%2Fpatterns_for_continuous_integration_docker_travis_ci_1/lists"}