{"id":14065575,"url":"https://github.com/DIPSAS/DockerBuildSystem","last_synced_at":"2025-07-29T20:33:16.376Z","repository":{"id":90879834,"uuid":"133937355","full_name":"DIPSAS/DockerBuildSystem","owner":"DIPSAS","description":"A simple library for handling docker commands with python.","archived":true,"fork":false,"pushed_at":"2021-09-22T23:49:56.000Z","size":78,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-04T04:33:45.635Z","etag":null,"topics":["buildsystem","docker","python","yml-files"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DIPSAS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-18T10:02:22.000Z","updated_at":"2023-01-28T06:23:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"d58b4e3d-fb2f-49ed-a4dc-1bdb197dcc1c","html_url":"https://github.com/DIPSAS/DockerBuildSystem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DIPSAS/DockerBuildSystem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIPSAS%2FDockerBuildSystem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIPSAS%2FDockerBuildSystem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIPSAS%2FDockerBuildSystem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIPSAS%2FDockerBuildSystem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DIPSAS","download_url":"https://codeload.github.com/DIPSAS/DockerBuildSystem/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DIPSAS%2FDockerBuildSystem/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267754861,"owners_count":24139435,"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-29T02:00:12.549Z","response_time":2574,"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":["buildsystem","docker","python","yml-files"],"created_at":"2024-08-13T07:04:34.139Z","updated_at":"2025-07-29T20:33:16.097Z","avatar_url":"https://github.com/DIPSAS.png","language":"Python","readme":"# Docker Build System\n\n[![PyPI version](https://badge.fury.io/py/DockerBuildSystem.svg)](https://badge.fury.io/py/DockerBuildSystem)\n[![Build Status](https://travis-ci.com/DIPSAS/DockerBuildSystem.svg?branch=master)](https://travis-ci.com/DIPSAS/DockerBuildSystem)\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n\n# !DEPRECATED!\nPlease follow new source: \n- https://github.com/hansehe/DockerBuildSystem\n\nA simple library for handling docker commands with python.\n\n## Install Or Upgrade\n- pip install --upgrade DockerBuildSystem\n\n## Example\n- Include DockerBuildSystem tools:\n```python\nfrom DockerBuildSystem import DockerComposeTools, DockerImageTools, DockerSwarmTools, TerminalTools, VersionTools\n```\n\n- Merge, build and run docker-compose.*.yml files:\n```python\ncomposeFiles = [\n    'docker-compose.yml',\n    'docker-compose.build.yml',\n    'docker-compose.override.yml'\n]\nmergedComposeFile = \"docker-compose.generated.dev.yml\"\nDockerComposeTools.MergeComposeFiles(composeFiles, mergedComposeFile)\nDockerComposeTools.DockerComposeBuild([mergedComposeFile])\nDockerComposeTools.DockerComposeUp([mergedComposeFile])\n```\n\n- Push and pull images in docker-compose.*.yml files, including additional `latest` tag:\n```python\ncomposeFiles = [\n    'docker-compose.yml'\n]\nDockerComposeTools.DockerComposePush(composeFiles)\nDockerComposeTools.PublishDockerImagesWithNewTag(composeFiles, 'latest')\nDockerComposeTools.DockerComposePull(composeFiles)\n```\n\n- Execute test projects in Docker containers and raise exception if container exits with error code due to failing tests:\n```python\ncomposeFiles = [\n    'docker-compose.tests.yml'\n]\ntestContainerNames = [\n    'lab-services-tests'\n]\nDockerComposeTools.ExecuteComposeTests(composeFiles, testContainerNames)\n```\n\n- Load set of specific environment variables from a `*.env` file:\n```python\nTerminalTools.LoadEnvironmentVariables('path_to/variables.env')\n```\n\n- Export top-most version from CHANGELOG.md file (see the example folder) as an environment variable:\n```python\nVersionTools.ExportVersionFromChangelogToEnvironment(\"path_to/CHANGELOG.md\", \"version\")\n```\n- Optionally export versionmajor and versionminor based on the top-most version from CHANGELOG.md file as an environment variable:\n```python\nVersionTools.ExportVersionFromChangelogToEnvironment(\"path_to/CHANGELOG.md\", \"version\", \"versionmajor\", \"versionminor\")\n```\n\n- to use the DockerComposeTools.PromoteDockerImages functionality, provide the following parameters:\n- composeFile - the compose file containing theimages that should be promoted\n- targetTags - the tags you want to use when you push the image to the new feed\n- sourceFeed - the feed you want to pull the images from (should match the compose file)\n- targetFeed - the feed you want to push to\n- user - used for authenticating to sourceFeed and targetFeed\n- password - used for authenticating to sourceFeed and targetFeed\n- dryRun - boolean. True if you want to do a dryRun, i.e. print what would have happened\n\nPlease have a look at an example of use here:\n- https://github.com/DIPSAS/DockerBuildSystem/tree/master/example\n\n## Prerequisites\n- Docker:\n    - https://www.docker.com/get-docker\n- Install Dependencies:\n    - pip install -r requirements.txt\n\n## Additional Info\n- The pip package may be located at:\n    - https://pypi.org/project/DockerBuildSystem\n\n## Publish New Version.\n1. Configure setup.py with new version.\n2. Install build tools: `pip install twine wheel`\n3. Build: python setup.py bdist_wheel\n4. Check: twine check dist/*\n5. Publish: twine upload dist/*\n\n## Test a new version locally\n1. Build: python setup.py bdist_wheel\n2. Install from local file with force-reinstall and no-cache-dir options to force reinstallation when you have changed the code without changing the version number: `python -m pip install path\\to\\yourgitrepo\\DockerBuildSystem\\dist\\DockerBuildSystem-1.1.43-py2.py3-none-any.whl --force-reinstall --no-cache-dir`\n\n## Run Unit Tests\n- python -m unittest","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDIPSAS%2FDockerBuildSystem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDIPSAS%2FDockerBuildSystem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDIPSAS%2FDockerBuildSystem/lists"}