{"id":13342885,"url":"https://github.com/grafana/xk6-docker","last_synced_at":"2025-10-01T18:32:09.024Z","repository":{"id":44762542,"uuid":"343379782","full_name":"grafana/xk6-docker","owner":"grafana","description":"k6 extension for interacting with Docker containers and images from a test script. ","archived":true,"fork":false,"pushed_at":"2023-11-20T16:44:02.000Z","size":1714,"stargazers_count":15,"open_issues_count":6,"forks_count":2,"subscribers_count":143,"default_branch":"main","last_synced_at":"2024-11-14T22:36:03.987Z","etag":null,"topics":["docker","k6","xk6"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grafana.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-03-01T10:42:54.000Z","updated_at":"2024-09-19T09:35:58.000Z","dependencies_parsed_at":"2023-11-20T17:53:36.818Z","dependency_job_id":null,"html_url":"https://github.com/grafana/xk6-docker","commit_stats":null,"previous_names":["k6io/xk6-docker"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fxk6-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fxk6-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fxk6-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grafana%2Fxk6-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grafana","download_url":"https://codeload.github.com/grafana/xk6-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234892715,"owners_count":18902907,"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":["docker","k6","xk6"],"created_at":"2024-07-29T19:30:06.585Z","updated_at":"2025-10-01T18:32:08.640Z","avatar_url":"https://github.com/grafana.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e ### ⚠️ Deprecated!!!\n\u003e\n\u003e This extension was originally created as a _proof of concept_.\n\u003e At this time, there are no maintainers available to support this extension.\n\u003e\n\u003e USE AT YOUR OWN RISK!\n\n\u003cbr /\u003e\n\n# xk6-docker\nA k6 extension for using of Docker CLI in testing. Built for [k6](https://go.k6.io/k6) using [xk6](https://github.com/grafana/xk6).\n\n## Build\n\nTo build a `k6` binary with this extension, first ensure you have the prerequisites:\n\n- [Go toolchain](https://go101.org/article/go-toolchain.html)\n- Git\n\nThen:\n\n1. Download `xk6`:\n  ```bash\n  $ go install go.k6.io/xk6/cmd/xk6@latest\n  ```\n\n2. Build the binary:\n  ```bash\n  $ xk6 build --with github.com/grafana/xk6-docker@latest\n  ```\n\n## Example\n\n```javascript\nimport containers from 'k6/x/docker/containers';\n\nexport default function () {\n  containers.list().forEach((container) =\u003e {\n    console.log(container.id.substring(0, 10));\n  });\n}\n```\n\nResult output:\n\n```plain\n$ ./k6 run script.js\n\n          /\\      |‾‾| /‾‾/   /‾‾/   \n     /\\  /  \\     |  |/  /   /  /    \n    /  \\/    \\    |     (   /   ‾‾\\  \n   /          \\   |  |\\  \\ |  (‾)  | \n  / __________ \\  |__| \\__\\ \\_____/ .io\n\n  execution: local\n     script: ../xk6-docker/script.js\n     output: -\n\n  scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):\n           * default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)\n\nINFO[0000] 32c2786ccb\nINFO[0000] 738b15d70f\nINFO[0000] 5813101144\nINFO[0000] b1fda43ce2\n\nrunning (00m00.0s), 0/1 VUs, 1 complete and 0 interrupted iterations\ndefault ✓ [======================================] 1 VUs  00m00.0s/10m0s  1/1 iters, 1 per VU\n\n     data_received........: 0 B 0 B/s\n     data_sent............: 0 B 0 B/s\n     iteration_duration...: avg=9.64ms min=9.64ms med=9.64ms max=9.64ms p(90)=9.64ms p(95)=9.64ms\n     iterations...........: 1   25.017512/s\n\n```\n\nInspect [`examples`](examples) folder for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fxk6-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrafana%2Fxk6-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrafana%2Fxk6-docker/lists"}