{"id":19874201,"url":"https://github.com/pythoninthegrass/docker_101","last_synced_at":"2025-07-23T19:04:20.894Z","repository":{"id":69309385,"uuid":"600944918","full_name":"pythoninthegrass/docker_101","owner":"pythoninthegrass","description":"Source code for Meetup presentation on Docker.","archived":false,"fork":false,"pushed_at":"2025-02-07T22:47:38.000Z","size":30194,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T07:08:21.643Z","etag":null,"topics":["docker","docker-compose","python"],"latest_commit_sha":null,"homepage":"","language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pythoninthegrass.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","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,"zenodo":null},"funding":{"github":["pythoninthegrass"]}},"created_at":"2023-02-13T02:52:51.000Z","updated_at":"2023-04-19T15:37:18.000Z","dependencies_parsed_at":"2025-07-01T07:08:22.483Z","dependency_job_id":"876510fe-35f8-42cc-b23a-2b127fed3a18","html_url":"https://github.com/pythoninthegrass/docker_101","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"pythoninthegrass/python_template","purl":"pkg:github/pythoninthegrass/docker_101","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fdocker_101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fdocker_101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fdocker_101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fdocker_101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pythoninthegrass","download_url":"https://codeload.github.com/pythoninthegrass/docker_101/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pythoninthegrass%2Fdocker_101/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266737568,"owners_count":23976389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["docker","docker-compose","python"],"created_at":"2024-11-12T16:22:18.111Z","updated_at":"2025-07-23T19:04:20.871Z","avatar_url":"https://github.com/pythoninthegrass.png","language":"Just","readme":"# docker_101\n\n\u003c!-- \u003cimg src=\"https://user-images.githubusercontent.com/4097471/144654508-823c6e31-5e10-404c-9f9f-0d6b9d6ce617.jpg\" width=\"300\"\u003e --\u003e\n\n## Summary\nDocker presentation and demo for Python in the Grass 🐍 🌱\n\n### Caveat Emptor\nVery little of this gets tested on Windows hosts. Windows Subsystem for Linux (WSL) is used where necessary with the default Ubuntu LTS install. Moved bulk of document to the [docs](docs/) directory to opt-in vs. opt-out of documentation.\n\n\n**Table of Contents**\n* [docker\\_101](#docker_101)\n  * [Summary](#summary)\n    * [Caveat Emptor](#caveat-emptor)\n  * [Setup](#setup)\n  * [Usage](#usage)\n    * [Mac and Linux users](#mac-and-linux-users)\n    * [Create virtual environment](#create-virtual-environment)\n    * [Run the application](#run-the-application)\n      * [CLI bits](#cli-bits)\n      * [Clicky-clicky](#clicky-clicky)\n  * [Pushing to Docker Hub with CI](#pushing-to-docker-hub-with-ci)\n    * [What you need to modify in this file](#what-you-need-to-modify-in-this-file)\n  * [Add git submodules](#add-git-submodules)\n  * [TODO](#todo)\n\n## Setup\n* Install\n    * [editorconfig](https://editorconfig.org/)\n    * [asdf](https://asdf-vm.com/guide/getting-started.html#_2-download-asdf)\n    * [poetry](https://python-poetry.org/docs/)\n    * [docker-compose](https://docs.docker.com/compose/install/)\n    * [justfile](https://just.systems/man/en/)\n    * [wsl](https://docs.microsoft.com/en-us/windows/wsl/setup/environment)\n* [Setup asdf](docs/asdf.md)\n* [Setup poetry](docs/poetry.md)\n\n## Usage\n### Mac and Linux users\nDevelopment environments and tooling are first-class citizens on macOS and *nix. For Windows faithfuls, please setup [WSL](markdown/wsl.md).\n\n### Create virtual environment\n```bash\n# install python w/asdf\nasdf list python\nasdf install python 3.11.3\n\n# create virtual environment\npoetry config virtualenvs.in-project true\npoetry env use python\npoetry install --no-root\n```\n\n### Run the application\n#### CLI bits\n```bash\n# poetry\npoetry run ./startup.sh \u003coverride_port\u003e             # ctrl-c to exit\n\n# docker\ndocker build -t my-hello-world -f Dockerfile.web .\ndocker run -it --rm -p 80:3000 my-hello-world       # ctrl-c to exit\ndocker exec -it my-hello-world bash                 # ctrl-d to exit\n\n# docker-compose\ndocker-compose build --no-cache --parallel\ndocker-compose up -d\ndocker-compose down --remove-orphans\n\n# justfile\njust                                                # list all options\n## docker\njust run                                            # ctrl-c to exit\njust exec                                           # ctrl-d to exit\n## docker-compose\njust build-clean                                    # docker-compose build --no-cache --parallel\njust up                                             # docker-compose up -d\njust down                                           # docker-compose down --remove-orphans\n```\n#### Clicky-clicky\nCopy the `.env.example` file to `.env` and modify the values as needed.\n\nDefault port is `3000`. If you want to override the port, pass it as an argument to the `startup.sh` script.\n\nOpen a browser to either the override port or the default port to see the application running (e.g. `http://localhost:3000`).\n\nAvailable endpoints are `/docs` and `/message/{msg}`; latter encodes whitespace as `%20` automatically.\n\n## Pushing to Docker Hub with CI\nDocker Hub is a cloud-based repository in which Docker users and partners create, test, store and distribute container images. Docker images are pushed to Docker Hub through the `docker push` command. A single Docker Hub repository can hold many Docker images (stored as tags).\n\nAutomated CI is implemented via GitHub Actions to build and push this repository's image to Docker Hub in `.github/workflows/ci.yml`.\n\n### What you need to modify in this file\n* Add repository secrets (Docker Hub)\n  * `DOCKERHUB_TOKEN`\n  * `DOCKERHUB_USER`\n* Add environment variable (image name)\n  * `APP_NAME` \n\n## Add git submodules\nFor completeness, add another git repo as a submodule.\n    ```bash\n    git submodule add https://github.com/pythoninthegrass/node_with_docker.git node\n    git submodule update --init --recursive\n    git submodule update --recursive\n    ```\n\n[Instructions to create a token](https://docs.docker.com/docker-hub/access-tokens/#create-an-access-token).\n\n[Instructions to disable this action](https://docs.github.com/en/actions/managing-workflow-runs/disabling-and-enabling-a-workflow) if you don't want this feature.\n\n## TODO\n* [Open Issues](https://github.com/pythoninthegrass/docker_101/issues)\n","funding_links":["https://github.com/sponsors/pythoninthegrass"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fdocker_101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpythoninthegrass%2Fdocker_101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpythoninthegrass%2Fdocker_101/lists"}