{"id":18308717,"url":"https://github.com/ardriveapp/ardrive-bats-docker","last_synced_at":"2025-10-31T20:03:06.418Z","repository":{"id":40244492,"uuid":"425040640","full_name":"ardriveapp/ardrive-bats-docker","owner":"ardriveapp","description":"Contains the Dockerfile and CI tooling necessary to build Docker images that test the ArDrive CLI with BATS","archived":false,"fork":false,"pushed_at":"2022-12-13T23:29:47.000Z","size":5039,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"production","last_synced_at":"2025-10-13T13:28:10.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/ardriveapp.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}},"created_at":"2021-11-05T18:01:13.000Z","updated_at":"2021-12-29T17:23:29.000Z","dependencies_parsed_at":"2023-01-28T15:47:35.501Z","dependency_job_id":null,"html_url":"https://github.com/ardriveapp/ardrive-bats-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ardriveapp/ardrive-bats-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fardrive-bats-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fardrive-bats-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fardrive-bats-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fardrive-bats-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardriveapp","download_url":"https://codeload.github.com/ardriveapp/ardrive-bats-docker/tar.gz/refs/heads/production","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardriveapp%2Fardrive-bats-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282049663,"owners_count":26605488,"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","status":"online","status_checked_at":"2025-10-31T02:00:07.401Z","response_time":57,"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-05T16:09:04.457Z","updated_at":"2025-10-31T20:03:06.398Z","avatar_url":"https://github.com/ardriveapp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bats Docker\n\nDocker image with every tool you need to test the Ardrive CLI with BATS.\n\nWe _strongly_ suggest to load recommended VSCode extensions for this to work with BATS\n\njq, GNU parallels are included. Vim is the default text editor but Nano is also included.\n\n# Build \u0026 Run\n\n## Build\n\nOn repo root folder:\n\n`$ docker build . -t ardrive-bats-docker:latest `\n\n## Run\n\n### Interactive\n\nUse this command to execute an interactive session and build _master_\n\n`$ docker run --name ardrive-cli-bats --rm --init -it --mount type=tmpfs,destination=/home/node/tmp ardrive-bats-docker `\n\nTo build a specific branch add this flag:\n\n`-e BRANCH='dev'`\n\nTo disable cloning and installing, use:\n\n`-e NO_SETUP=1`\n\n### Detached\n\nRun\n\n`$ docker run --name ardrive-cli-bats --rm --init -tdi --mount type=tmpfs,destination=/home/node/tmp ardrive-bats-docker \u0026\u0026 sleep 20 `\n\nThis includes a sleep of 20 seconds to ensure Docker clones and builds. Please be aware that this docker will last till you shutdown your system OR you manually stop it (docker stop ardrive-bats)\n\nNow we can run commands inside docker. Below we run ardrive CLI on _ardrive-cli_ directory\n\n`docker exec -w /home/node/ardrive-cli ardrive-cli-bats yarn ardrive`\n\nTo run every sample test, we just need to use\n\n`docker exec -w /home/node/ardrive-cli ardrive-cli-bats bats -r ../test_samples/`\n\n`-r` flag stands for recursive\n\nAnd in case we want to keep the output, just pipe the content\n\ne.g.\n\n`docker exec -w /home/node/ardrive-cli ardrive-cli-bats bats -r ../test_samples/ | tee my.log \u0026\u0026 mv my.log BATS-test_$(date +%d-%m-%Y_%H-%S).log`\n\nwill not only put everything inside a file, but rename that file with a timestamp resulting in `BATS-test_(local-time-date).log`\n\n### Local ENV\n\nTo load your local environment and test your local code, first we need to run the container, in this case, without setup.\n\n`docker run --name ardrive-cli-bats --rm --init -ti -e NO_SETUP=1 --mount type=tmpfs,destination=/home/node/tmp ardrive-bats-docker `\n\nNow, in a new terminal, we just copy ardrive-cli folder\n\nIf current working directory is the repo root, we need to execute:\n\n#### On Linux/WSL\n\n`docker cp . ardrive-cli-bats:/home/node/ardrive-cli `\n\n#### On MacOS ONLY\n\n`docker cp . ardrive-cli-bats:/tmp/ardrive-cli \u0026\u0026 docker exec -i ardrive-cli-bats bash -c 'cp -r /tmp/ardrive-cli /home/node/ardrive-cli' `\n\nNow you will have your local environment loaded into Docker. You do not need to run `yarn \u0026\u0026 yarn build `again\nEvery time you want to load your latest changes, just run the above command again. For a clean environment, you could always remove the ardrive-cli folder INSIDE the docker.\n\n`rm -rf ardrive-cli `\n\n## Interact with a wallet\n\nPlease refer to [wallets document](https://github.com/ardriveapp/ardrive-cli/blob/master/bats_test/wallets.md) on ardrive-cli/bats_test\n\n## BATS tests\n\nPlease check [BATS Quick Guide on ardrive-cli/bats_test](https://github.com/ardriveapp/ardrive-cli/tree/master/bats_test#quick-guide)\n\n## Writing tests\n\nFor documentation regarding how to write tests, please check readme [on ardrive-cli/bats_test](https://github.com/ardriveapp/ardrive-cli/blob/master/bats_test/readme.md)\n\n## Network tests\n\nPlease check networking documentation [on ardrive-cli/bats_test](https://github.com/ardriveapp/ardrive-cli/blob/master/bats_test/network_tools.md)\n\n## Writing tests and BATS\n\nFor documentation about BATS, please check readme [on ardrive-cli/bats_test](https://github.com/ardriveapp/ardrive-cli/blob/master/bats_test/readme.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardriveapp%2Fardrive-bats-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardriveapp%2Fardrive-bats-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardriveapp%2Fardrive-bats-docker/lists"}