{"id":18354476,"url":"https://github.com/alvarofpp/docker-s2client","last_synced_at":"2026-05-08T13:32:26.513Z","repository":{"id":45549330,"uuid":"381164732","full_name":"alvarofpp/docker-s2client","owner":"alvarofpp","description":"This docker image was built to facilitate the development of scriptedbots and research using the s2client-proto.","archived":false,"fork":false,"pushed_at":"2024-02-24T21:50:15.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T16:47:35.240Z","etag":null,"topics":["docker","docker-image","s2client-api","starcraft-ii"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/alvarofpp/s2client","language":"Shell","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/alvarofpp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-28T21:24:41.000Z","updated_at":"2024-08-15T16:50:41.000Z","dependencies_parsed_at":"2024-02-08T03:23:35.072Z","dependency_job_id":"724637cf-2faf-49b1-967f-01ab18ae5280","html_url":"https://github.com/alvarofpp/docker-s2client","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/alvarofpp%2Fdocker-s2client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fdocker-s2client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fdocker-s2client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alvarofpp%2Fdocker-s2client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alvarofpp","download_url":"https://codeload.github.com/alvarofpp/docker-s2client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137937,"owners_count":21053784,"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","docker-image","s2client-api","starcraft-ii"],"created_at":"2024-11-05T22:04:13.312Z","updated_at":"2026-05-08T13:32:21.462Z","avatar_url":"https://github.com/alvarofpp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker for StarCraft II Client\n\n[![Docker Hub](https://img.shields.io/badge/-Docker_Hub-0062cc?style=for-the-badge\u0026logo=Docker\u0026logoColor=white)][docker-hub]\n\nThis docker image was built to facilitate the development of scripted bots and research using the [s2client-proto][s2client-proto].\n\n## Tags\n\nThis docker image have one tag for each one version listed in [Linux Packages][s2client-proto-linux].\nYou can see all tags [here][docker-hub-tags].\n\nExample: if you want to take the version 4.9.3, you need to specify this version in the docker pull command:\n`docker pull alvarofpp/s2client:4.9.3`.\n\nThe `latest` is the same image of the `4.10`, because it's the latest version until this moment.\nIf you use the `latest` version, you can ignore the `:\u003cversion\u003e` in these commands below.\n\n## Getting Started\n\nThese instructions will cover usage information and for the docker container.\n\n### Prerequisites\n\nIn order to run this container you'll need docker installed.\n\n- [Get Started][docker-get-started]\n\n### Usage\n\nDocker pull command:\n\n```shell\ndocker pull alvarofpp/s2client:\u003cversion\u003e\n```\n\nAnd run the client:\n\n```shell\ndocker run --rm alvarofpp/s2client:\u003cversion\u003e run_client\n```\n\nRun your client in a specific port:\n\n```shell\ndocker run --rm --env CLIENT_PORT=13000 alvarofpp/s2client:\u003cversion\u003e run_client\n```\n\n#### Environment Variables\n\n- `CLIENT_PORT` - The port the client runs on. By default is `12000`.\n\n## Maps and minigames\n\nThis image already comes with the all maps listed in [Map Packs][map-packs]\nand the [pysc2's minigames (version 1.2)][minigames].\nBut if you need add more maps or minigames, you can through the command:\n\n```shell\ndocker cp \u003cmap_folder\u003e \u003ccontainer_id\u003e:/root/StarCraftII/Maps/\n```\n\nAll maps and minigames downloaded for the image are listed in `image/maps.txt`.\n\n## Use multi-stage builds\n\nUsing Docker's multi-stage, you can copy the StarCraft 2 files\nand use it in your own Docker image.\n\n```dockerfile\nFROM alvarofpp/s2client:4.10 AS sc2client\nFROM python:3.9.10\n\n# ...\nCOPY --from=sc2client /root/StarCraftII /root/StarCraftII\n```\n\n## Display graphics (Linux)\n\nIf you want to display graphics during the script execution, you can follow the steps below.\n\n### Step 1\n\n```shell\ndocker run -i -t -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro alvarofpp/s2client:\u003cversion\u003e\n```\n\nDescription:\n\n- `-i`: sets up an interactive session;\n- `-t`: allocates a pseudo tty;\n- `-e`: sets the host display to the local machines display (which will usually be `:0`);\n- `-v`: bind mounts the `X11` socket residing in `/tmp/.X11-unix` on your  \nlocal machine into `/tmp/.X11-unix` in the container and `:ro` makes the socket read only.\n\n### Step 2\n\nIn your local machine:\n\n```shell\nxhost +\n# access control disabled, clients can connect from any host\n\nxhost\n# access control disabled, clients can connect from any host\n# SI:localuser:username\n```\n\nSave the last line of the `xhost` result (in this example it's `SI:localuser:username`)\nfor use in the next step.\n\n### Step 3\n\nIn your docker container:\n\n```shell\nxhost +si:localuser:username\n# localuser:username being added to access control list\n```\n\nDone! After that, you can run your script.\n\nReference [here][stackoverflow-x11].\n\n## Contributing\n\nContributions are more than welcome. Fork, improve and make a pull request.\nFor bugs, ideas for improvement or other, please create an [issue][github-issues].\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\nIf you use this docker image, you also agree to [AI and Machine Learning License][blizzard-ai-ml-license].\n\n[blizzard-ai-ml-license]: http://blzdistsc2-a.akamaihd.net/AI_AND_MACHINE_LEARNING_LICENSE.html\n[docker-get-started]: https://docs.docker.com/get-started/\n[docker-hub]: https://hub.docker.com/r/alvarofpp/s2client\n[docker-hub-tags]: https://hub.docker.com/r/alvarofpp/s2client/tags\n[s2client-proto]: https://github.com/Blizzard/s2client-proto\n[s2client-proto-linux]: https://github.com/Blizzard/s2client-proto#linux-packages\n[map-packs]: http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3_Updated.zip\n[minigames]: https://github.com/deepmind/pysc2/releases/tag/v1.2\n[stackoverflow-x11]: https://stackoverflow.com/questions/25281992/alternatives-to-ssh-x11-forwarding-for-docker-containers\n[github-issues]: https://github.com/alvarofpp/docker-s2client/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarofpp%2Fdocker-s2client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarofpp%2Fdocker-s2client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarofpp%2Fdocker-s2client/lists"}