{"id":16833823,"url":"https://github.com/mvdan/dockexec","last_synced_at":"2025-04-06T06:12:55.131Z","repository":{"id":45092724,"uuid":"225417012","full_name":"mvdan/dockexec","owner":"mvdan","description":"Run Go tests inside a Docker image","archived":false,"fork":false,"pushed_at":"2025-02-11T23:33:59.000Z","size":39,"stargazers_count":99,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-30T05:07:58.894Z","etag":null,"topics":["docker","golang","testing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mvdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"mvdan"}},"created_at":"2019-12-02T16:13:05.000Z","updated_at":"2025-02-11T23:34:02.000Z","dependencies_parsed_at":"2022-09-13T07:02:27.742Z","dependency_job_id":"75f5b47d-8452-4169-b84b-5e6f861e688e","html_url":"https://github.com/mvdan/dockexec","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":"0.18181818181818177","last_synced_commit":"cd58673be22102107fd667f3e07a1ecad562ad58"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fdockexec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fdockexec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fdockexec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvdan%2Fdockexec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvdan","download_url":"https://codeload.github.com/mvdan/dockexec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441060,"owners_count":20939239,"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","golang","testing"],"created_at":"2024-10-13T11:55:22.740Z","updated_at":"2025-04-06T06:12:55.105Z","avatar_url":"https://github.com/mvdan.png","language":"Go","funding_links":["https://github.com/sponsors/mvdan"],"categories":[],"sub_categories":[],"readme":"# dockexec\n\nRun Go tests inside a Docker image.\n\n\tgo install mvdan.cc/dockexec@latest\n\tgo test -exec='dockexec postgres:12.1'\n\nYou can also use custom flags for `docker run`, as well as any test flags:\n\n\tgo test -exec='dockexec [docker flags] image:tag' [test flags]\n\n`go run` is also supported:\n\n\tgo run -exec='dockexec postgres:12.1' .\n\nThe goal is to easily test many packages with specific Docker images, without\nhaving to write the boilerplate code yourself. All previous alternatives weren't\nany good:\n\n* Running `go test` inside `docker run` requires your Go version to be installed\n  in the image.\n* Running `go test -c` and running the test binary under `docker run` is\n  tedious, error-prone, and doesn't scale to many packages.\n\n### Caveats\n\n* `go test` without package arguments runs tests with access to the current\n  terminal. However, `go test -exec=\"dockexec $image\"` will not, as `dockexec`\n  cannot distinguish this mode from others like `go test -exec=\"dockexec $image\"\n  ./...`. If you want access to the terminal, supply the `-t` docker flag.\n\n* Docker images are assumed to be unix-like at the moment, and only Linux images\n  are tested. Other platforms like Windows-native images may be supported in the\n  future.\n\n* Beware that the Docker image may not have compatible C libraries, given the\n  default of `CGO_ENABLED=1`. If you run into \"no such file\" exec errors,\n  or glibc version mismatch errors, you should consider disabling cgo via\n  `CGO_ENABLED=0` or a [fully static build](https://github.com/golang/go/issues/26492).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdan%2Fdockexec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvdan%2Fdockexec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvdan%2Fdockexec/lists"}