{"id":22737658,"url":"https://github.com/telekom-mms/docker-management-container","last_synced_at":"2025-04-14T04:44:43.708Z","repository":{"id":38195928,"uuid":"314249372","full_name":"telekom-mms/docker-management-container","owner":"telekom-mms","description":"The Docker Management Container includes a set of plugins and services that make it easier to build, test, deploy and manage infrastructure.","archived":false,"fork":false,"pushed_at":"2025-04-07T04:37:12.000Z","size":256,"stargazers_count":13,"open_issues_count":7,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-07T05:27:37.416Z","etag":null,"topics":["ansible","devops","docker","helm","kubectl","terraform"],"latest_commit_sha":null,"homepage":"https://telekom-mms.github.io/docker-management-container/","language":"Shell","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/telekom-mms.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-19T13:01:24.000Z","updated_at":"2025-04-07T04:37:15.000Z","dependencies_parsed_at":"2024-10-25T02:42:50.526Z","dependency_job_id":"6c9ae53b-69fe-4c2e-ad9d-9d687f9d75c1","html_url":"https://github.com/telekom-mms/docker-management-container","commit_stats":null,"previous_names":["t-systems-mms/docker-management-container"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telekom-mms%2Fdocker-management-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telekom-mms%2Fdocker-management-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telekom-mms%2Fdocker-management-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telekom-mms%2Fdocker-management-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telekom-mms","download_url":"https://codeload.github.com/telekom-mms/docker-management-container/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824665,"owners_count":21167343,"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","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":["ansible","devops","docker","helm","kubectl","terraform"],"created_at":"2024-12-10T22:17:05.952Z","updated_at":"2025-04-14T04:44:43.682Z","avatar_url":"https://github.com/telekom-mms.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Management Container\n\nThe Docker Management Container (or DMC for short) contains a number of plugins and services that are designed to make it easy to create, test, deploy and manage infrastructures. For more information also take a look at our [Blog](https://blog.telekom-mms.com/tech-insights/manage-your-infrastructure-better-with-this-opensource-tool).\n\n\u003cpicture\u003e\n  \u003csource\n    srcset=\"https://user-images.githubusercontent.com/3198961/186105564-3901aded-21f1-4191-b323-e943f49ea5ed.png\"\n    media=\"(prefers-color-scheme: dark)\"\n    width=\"30%\" height=\"30%\"\u003e\n  \u003cimg width=\"30%\" height=\"30%\" src=\"\"\u003e\n\u003c/picture\u003e\n\n## How does the DMC work?\n\nThe DMC provides a Dockerfile template (from modular setup) that creates the Dockerfile with the desired tools and versions through a file and script. This Dockerfile is then used for the actual build of the container. The Dockerfile itself does not need to be kept, but is created and discarded after the build of the Dockerfile.\n\nThe DMC uses the wakemeops as base setup, for more information about wakemeops look at the [docs](https://docs.wakemeops.com/).\n\n### Try it out\n\nFor a quick overview and test of the DMC, we have created images based on the [minimal](examples/min_build.yaml) and [full](examples/full_build.yaml) examples that can be used directly.\n\n``` bash\n# minimal\ndocker run ghcr.io/telekom-mms/dmc:min\n\n# full\ndocker run ghcr.io/telekom-mms/dmc:full\n```\n\n## Usage\n\n### Setup and Configuration\n\nSetup plugins, services, tools, versions and configuration over file with yaml syntax.\n\nCreate a build.yaml:\n\n``` bash\ntouch build.yaml\n```\n\nThen fill it with the settings you need:\n\n* [Image](docs/usage/setup_and_configuration/image.md)\n* [Base](docs/usage/setup_and_configuration/base.md)\n* [Tools](docs/usage/setup_and_configuration/tools.md)\n* [Tool Config](docs/usage/setup_and_configuration/tool_config.md)\n* [Post Build Config](docs/usage/setup_and_configuration/post_build_config.md)\n* [Tool Config](docs/usage/setup_and_configuration/tool_config.md)\n\nTake a look at the examples to see what's possible:\n\n## Examples\n\nExamples for the `build.yaml` could be found under [examples](examples):\n\n* [minimal](examples/min_build.yaml)\n* [full](examples/full_build.yaml)\n\n### Build\n\n#### Dockerfile\n\nTo create the Dockerfile from Template you have to run the following steps.\n\n1. Create `build.yaml` with your needed settings\n2. Run the script `render.sh`\n3. Build the Docker Image\n\n`render.sh`\n\nThe build script will create the `Dockerfile` from template.d with your settings from `build.yaml`.\n\n``` bash\nsh render.sh .\n```\n\n#### Image\n\n``` bash\ndocker image build -t dmc:latest .\n```\n\nExamples for build within CI Pipelines can be found under [examples/pipeline](examples/pipeline).\n\n#### Included build preset\n\nProvided build presets can be found under [pipeline](pipeline). The preset also sets some labels e.g. the version of the dmc release (dmc-version), you can get this information with `docker inspect`.\n\n``` bash\n\u003e docker inspect service-mgmt-dmc --format '{{ json .Config.Labels }}' | jq .\n{\n  \"dmc-version\": \"3.2.0\",\n  \"org.wakemeops.base_image\": \"\\\"docker.io/ubuntu:latest\\\"\",\n  \"org.wakemeops.commit\": \"\\\"65d81642eb025d20c4db5b45758879b379bc6aa1\\\"\",\n  \"org.wakemeops.maintainers\": \"\\\"WakeMeOps \u003cwakemeops.com\u003e\\\"\"\n}\n```\n\n* [gitlab-ci](docs/build/image/preset/gitlab-ci.md)\n\n### Run Image\n\n#### local\n\nTo run the Docker Management Container your system must have Docker or Podman installed.\n\n* Linux Client\n* MacOS\n* Docker Desktop for Windows or WSL2\n\n``` bash\ndocker run -ti dmc:latest\n```\n\n##### mount volumes\n\nYou can mount your code or git repository into the container. This way you can work with your favorite editor and test the changes directly in the DMC.\n\nExample:\n\n``` bash\ndocker run -ti --env-file .docker_env -v${HOME}/git/service:/service -w /service dmc:latest\n```\n\n##### run the image with your local user and environment\n\nIf you mount your repositories to the DMC you might want to run it with your local user and environment\n\nThis should give you a few benefits:\n\n* no permissions issues when editing files from within the container\n* being able to use the local ssh auth key for ansible\n* local configuration is used in the container (.bashrc, .gitconfig, .vimrc etc)\n\nExample:\n\n```bash\ndocker run --rm -ti --hostname dmc \\\n  `# you can include your services environment variables if you like` \\\n  --env-file ~/service/.docker_env \\\n  \\\n  `# run as local user and make the container aware of users + groups` \\\n  -v /etc/passwd:/etc/passwd:ro \\\n  -v /etc/group:/etc/group:ro \\\n  --user \"$(id -u):$(id -g)\" \\\n  \\\n  `# provide ssh socket to the container for ansible to use` \\\n  -e 'SSH_AUTH_SOCK=/.ssh_auth' \\\n  -v ${SSH_AUTH_SOCK}:/.ssh_auth \\\n  \\\n  `# mount home and use the service subdirectory as workdir` \\\n  -v ${HOME}:${HOME} \\\n  -w ${HOME}/service \\\n  \\\n  dmc:latest\n```\n\n##### mount volumes with docker volume bindfs as root\n\nWith the [Docker volume plugin for bindfs](https://github.com/clecherbauer/docker-volume-bindfs), you're able to mount a given path and remap its owner and group.\nThis way you can be `root` inside the container while still mapping your home-directory inside the container (to `/root`) and using it without permission problems.\n\n```bash\n# create the docker volume\ndocker volume create -d lebokus/bindfs -o sourcePath=$PWD -o map=$(id -u)/0:@$(id -g)/@0 dmcvolume\n```\n\n```bash\n# run your dmc with the volume\ndocker run -it --user root -v dmcvolume:/root/ dmc:latest\n```\n\n## Included renovate preset\n\nWe provide a [renovate-preset](https://docs.renovatebot.com/key-concepts/presets/) to include in your configuration.\nIf you use it renovate can update the versions in your `build.yaml`\n\nInclude it like this:\n\n``` json\n{\n  \"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n  \"extends\": [\n    \"config:base\",\n    \"github\u003etelekom-mms/docker-management-container\"\n  ],\n}\n```\n\nChange your `build.yaml` like this to use it:\n\n``` yaml\npackages:\n  # renovate: datasource=repology depName=ubuntu_22_04/ansible versioning=loose\n  - ansible=2.10.7+merged+base+2.10.8+dfsg-1\n\n  ansible:\n    collections:\n      # renovate: datasource=galaxy-collection depName=telekom_mms.acme\n      - telekom_mms.acme=2.3.1\n```\n\n## Migration\n\nWith Version 2.0.0 there's a breaking change in the configuration and usage of the DMC.\nTo support the migration we provide a script to migrate from the old .docker_build to the new build.yaml.\n\n`migrate.sh`\n\n``` bash\nsh migrate.sh .\n```\n\n## Others\n\nFeedback, suggestions for improvement and expansion, and of course collaboration are expressly desired.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelekom-mms%2Fdocker-management-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelekom-mms%2Fdocker-management-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelekom-mms%2Fdocker-management-container/lists"}