{"id":21944915,"url":"https://github.com/browserstack/docker-browserstack-local","last_synced_at":"2025-09-15T08:29:48.397Z","repository":{"id":43485863,"uuid":"200638344","full_name":"browserstack/docker-browserstack-local","owner":"browserstack","description":"Docker official Image packaging for Browserstack Local Binary","archived":false,"fork":false,"pushed_at":"2023-07-28T11:52:34.000Z","size":29,"stargazers_count":13,"open_issues_count":3,"forks_count":4,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-03T17:46:47.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/browserstack.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}},"created_at":"2019-08-05T10:58:51.000Z","updated_at":"2024-11-18T21:01:34.000Z","dependencies_parsed_at":"2022-08-23T07:50:52.996Z","dependency_job_id":null,"html_url":"https://github.com/browserstack/docker-browserstack-local","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fdocker-browserstack-local","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fdocker-browserstack-local/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fdocker-browserstack-local/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browserstack%2Fdocker-browserstack-local/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browserstack","download_url":"https://codeload.github.com/browserstack/docker-browserstack-local/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244982058,"owners_count":20542300,"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":[],"created_at":"2024-11-29T04:17:24.141Z","updated_at":"2025-03-22T16:15:37.910Z","avatar_url":"https://github.com/browserstack.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-browserstack-local\nDocker official Image packaging for Browserstack Local Binary\n\n### Installation\n- Clone the repository. \n- Depending on the choice of `binary_version` / `platform`, choose the appropriate Dockerfile \n- Run ``` docker build  -t \u003cbuild name:tag\u003e \u003cpath to dockerfile\u003e``` \n- Eg. Build Image for Binary 8.9 on ubuntu platform.\n- ```docker build -t local 8.9/ubuntu```\n\n### Running the binary inside container with default command\n - Run the docker container using  \n- ```docker run -it \u003cbuild name:tag\u003e --key \u003cbrowserstack local testing access key\u003e```\n- The default entrypoint runs the binary without any arguments.\n- For achieving best local testing experience. You may choose to bind binary services to host. \n-  `docker run -it -p 127.0.0.1:45691:45691 -p 127.0.0.1:45690:45690 -p 127.0.0.1:45454:45454 -p 127.0.0.1:45954:45954 \u003cbuild name:tag\u003e --key \u003caccess key\u003e`\n\n### Running the binary inside container with custom arguments\nIn order to run binary with custom [arguments](https://browserstack.com/local-testing) simply run the binary as follows.\n`docker run -it \u003cbuild name:tag\u003e \u003carguments\u003e`\n\nEg. Running binary inside container with force local and verbose 3 enabled\n`docker run -it browserstack/local --key \u003caccess key\u003e --verbose 3 --force-local`\n\n\n### Running tests for a service running on the host. \nSince the binary is running inside the docker container, it would try to resolve all the host requests internally. Following methods can be used in order to overcome this limitation.\n\n### Method 1\n#### For Linux\n- Run the docker container with the following flag `–net=host`. By setting this flag the container’s network stack is not isolated from the Docker host. ( For additional information refer [here](https://docs.docker.com/network/host/)).\n\n- Running container with host netwroking\n```docker run --net=host -it browserstack/local \u003carguments\u003e```\n\n#### For Mac and Windows\n- Since Docker runs its container on a virtual machine on Mac and Windows. The method used in linux would only isolate the network interface between the virtual machine and the container. Hence, docker provides a way to access the host network using the url  `host.docker.internal`. (For additional information refer here ( [mac](https://docs.docker.com/docker-for-mac/networking/) | [windows](https://docs.docker.com/docker-for-windows/networking/) ).\n- Additionally, the test scripts have to be modified to include the above url instead of localhost.\n- Eg. If a service is running on port 3000, one can access the service by using host.docker.internal:3000.\n\n#### Method 2\nRun the server on a public interface (eg. 0.0.0.0 ) and use the public address in your test scripts. \n(Disclaimer : Please do understand the risk of running a service on public interface before following this method ).\n\n### FAQ's\n* Can I run live and app-live using the binary running inside the container?\n   - Yes. For making live and app-live work, you need to bind 45691, 45690 ports with host.\n   - Docker run command `docker run -it -p 127.0.0.1:45691:45691 -p 127.0.0.1:45690:45690 \u003cbuild name:tag\u003e --key \u003caccess key\u003e`\n\n* Can I access binary console dashboard from my host?\n  - Yes. You need to bind docker 45454, 45954 ports with host.\n  - Docker run command `docker run -it -p 127.0.0.1:45454:45454 -p 127.0.0.1:45954:45954 \u003cbuild name:tag\u003e --key \u003caccess key\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fdocker-browserstack-local","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowserstack%2Fdocker-browserstack-local","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowserstack%2Fdocker-browserstack-local/lists"}