{"id":25839717,"url":"https://github.com/netresearch/ansible_role_docker_containers","last_synced_at":"2026-04-11T21:39:14.484Z","repository":{"id":176354779,"uuid":"656697432","full_name":"netresearch/ansible_role_docker_containers","owner":"netresearch","description":"Ansible role for running Docker containers","archived":false,"fork":false,"pushed_at":"2025-02-18T12:51:47.000Z","size":19,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-18T13:40:26.345Z","etag":null,"topics":["ansible-role","container","docker-container"],"latest_commit_sha":null,"homepage":"","language":null,"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/netresearch.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":"2023-06-21T13:01:02.000Z","updated_at":"2025-02-18T12:51:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e3c3f17-22f1-4032-b8e6-3273716b502e","html_url":"https://github.com/netresearch/ansible_role_docker_containers","commit_stats":null,"previous_names":["netresearch/ansible_role_docker_containers"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fansible_role_docker_containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fansible_role_docker_containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fansible_role_docker_containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netresearch%2Fansible_role_docker_containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netresearch","download_url":"https://codeload.github.com/netresearch/ansible_role_docker_containers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241317607,"owners_count":19943199,"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-role","container","docker-container"],"created_at":"2025-03-01T04:34:10.023Z","updated_at":"2026-04-11T21:39:09.443Z","avatar_url":"https://github.com/netresearch.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker Containers Ansible Role\n\n## What does this role do?\n\nThis Ansible role provides a way to deploy multiple Docker containers.\n\n## Requirements\n\n- Debian 11 (bullseye) / 12 (bookworm)\n- Docker on target systems\n- Ansible 2.15.0\n\n## Variables\n\n| Name                            | Default Value | Description |\n| ------------------------------- | ------------- | ----------- |\n| `netresearch_docker_containers` | `[]`          | Containers  |\n\n### Container definition\n\n```yml\nnetresearch_docker_containers:\n  - name: string\n    image: string\n    # dictionary or undefined\n    login:\n      registry: string\n      username: string\n      password: string\n    # Just like the one in `community.general.docker_container`\n    # You have to provide this, an empty array is fine.\n    networks: []\n    # Just like the one in `community.general.docker_container`\n    network_mode: string\n    # Just like the one in `community.general.docker_container`\n    labels: {}\n    # Just like the one in `community.general.docker_container`\n    restart_policy: string\n    # Just like the one in `community.general.docker_container`\n    ports: []\n    # Just like the one in `community.general.docker_container`\n    env: {}\n    # Just like the one in `community.general.docker_container`\n    mounts: []\n    # Just like the one in `community.general.docker_container`\n    device_requests: []\n```\n\n### Example:\n\n```yml\nnetresearch_docker_containers:\n  - name: app\n    image: yourapp:latest\n    labels:\n      - traefik.enabled=true\n    networks:\n      - name: \"traefik-network\"\n    env:\n      SOME_ENV_VAR: \"somecontent\"\n    mounts:\n      - type: bind\n        source: /srv/app\n        target: /data\n\n  - name: traefik\n    image: traefik/traefik:latest\n    restart_policy: always\n    ports:\n      - \"80:80\"\n      - \"443:443\"\n    networks:\n      - name: \"traefik-network\"\n\n  - name: raybeam\n    image: ghcr.io/netresearch/raybeam:latest\n    login: # This will log into the GitHub Container Registry\n      registry: \"ghcr.io\"\n      username: \"yourusername\"\n      password: \"yourpassword\"\n    restart_policy: unless-stopped\n    networks:\n      - name: \"traefik-network\"\n    labels:\n      - traefik.enable=true\n      # ...\n\n  - name: ollama\n    image: ollama/ollama\n    ports:\n      - \"11434:11434\"\n    runtime: nvidia\n    device_requests:\n      - driver: nvidia\n        count: -1\n        capabilities:\n          - - gpu\n            - utility\n\n  - name: nvidia-gpu-exporter\n    image: utkuozdemir/nvidia_gpu_exporter:1.1.0\n    ports:\n      - \"9835:9835\"\n    devices:\n      - /dev/nvidiactl:/dev/nvidiactl\n      - /dev/nvidia0:/dev/nvidia0\n    mounts:\n      - type: bind\n        source: /usr/bin/nvidia-smi\n        target: /usr/bin/nvidia-smi\n      - type: bind\n        source: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so\n        target: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so\n      - type: bind\n        source: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1\n        target: /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1\n```\n\n## Testing\n\nFor simpler testing we have included molecule tests, which you can run with\n\n```shell\nmolecule test\n```\n\n### Prerequisites\n\n- `ansible`\n- `molecule`\n- A molecule driver depending on which scenario you want to run:\n  - `default` =\u003e `molecule-docker`\n  - `with-vagrant` =\u003e `molecule_vagrant`\n\nFor further information we have included the installation guide for `molecule` [here](./molecule/default/INSTALL.rst).\n\n## License\n\nThis Ansible role is licensed under the [MIT License](./LICENSE).\n\n## Contributing\n\nFeel free to contribute by creating a Pull Request!\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for commit messages and the default `gofmt` formatting rules.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetresearch%2Fansible_role_docker_containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetresearch%2Fansible_role_docker_containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetresearch%2Fansible_role_docker_containers/lists"}