{"id":19251220,"url":"https://github.com/rexops/rex-docker","last_synced_at":"2026-06-12T22:32:58.632Z","repository":{"id":138907931,"uuid":"61144490","full_name":"RexOps/rex-docker","owner":"RexOps","description":"Module to manage docker containers","archived":false,"fork":false,"pushed_at":"2016-06-19T07:36:28.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-23T16:48:39.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","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/RexOps.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":"2016-06-14T18:03:08.000Z","updated_at":"2018-12-10T18:28:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ade87eb-114b-4202-a83a-8c656f2c5677","html_url":"https://github.com/RexOps/rex-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RexOps/rex-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RexOps","download_url":"https://codeload.github.com/RexOps/rex-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RexOps%2Frex-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34265491,"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-12T02:00:06.859Z","response_time":109,"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":[],"created_at":"2024-11-09T18:21:10.235Z","updated_at":"2026-06-12T22:32:58.600Z","avatar_url":"https://github.com/RexOps.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker\n\nThis is a docker module for Rex to manage Docker containers.\n\n## STATUS\n\n* This module is for the current development branch (Rex 2)\n* This module is in developemnt state\n\n## Tasks\n\n### setup\n\nCall this task to install docker on your system.\n\n#### Parameters\n\n* ensure - Default: latest\n* package, Name of the package to install. - Default: docker.io\n* service, Name of the service to manager. - Default: docker\n* on_pkg_change, Code that should be executed when the package is updated. - Default: `service $service =\u003e \"restart\";`\n\n#### Example\n\n```perl\nuse Docker;\n\ntask \"setup\", sub {\n  Docker::setup;\n};\n```\n\n```perl\nuse Docker;\n\ntask \"setup\", sub {\n  Docker::setup {\n    on_pkg_change =\u003e sub { },  # do nothing\n  };\n};\n```\n\n### start | stop | restart | reload\n\nDo the named action with the docker service.\n\n#### Example\n\n```perl\nDocker::restart;\n```\n\n```bash\n$ rex -H $host Docker:restart\n```\n\n## Resources\n\n### container\n\nManage the state of a container.\n\n#### Parameters\n\n* ensure, State of the container - Default: present\n  * present\n  * running\n  * stop\n  * absent\n* image, Which image to pull/use for this container\n* expose, Ports to expose\n* bind, Volumes to bind\n* link, Other containers to link\n* environment, Environment variables to export to the container\n\n#### Example\n\n```perl\nDocker::container \"nginx\",\n  ensure =\u003e \"running\",\n  image  =\u003e \"nginx:latest\",\n  expose =\u003e {\n    \"80\"  =\u003e \"80/tcp\",\n    \"443\" =\u003e \"443/tcp\",\n  },\n  bind =\u003e {\n    \"/srv/containers/nginx/etc/nginx\" =\u003e \"/etc/nginx\",\n  },\n  link =\u003e {\n    \"redis\" =\u003e \"redis\",\n  },\n  environment =\u003e {\n    \"MY_THING\" =\u003e \"value\",\n  };\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frexops%2Frex-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frexops%2Frex-docker/lists"}