s2client-docker icon indicating copy to clipboard operation
s2client-docker copied to clipboard

Missing hello world example.

Open wizzup opened this issue 7 years ago • 2 comments

I follow building instruction on README.md

  • [x] Game container was build
  • [x] API container was build

There is no instruction on how to connect the API output to game yet. Since game and api are on different container, the instruction on Blizzard/s2client-api can't be follow anymore.

Instruction on how to connect to game container remotely is need.

wizzup avatar Aug 26 '17 09:08 wizzup

Thanks for jumping in. This is still very early!

So there are a few ways to do this. The model I had working last night that seemed to work well was using a docker volume. I will move forward with this model to see how the usability works out.

I also got some feedback that people would want a developer focused container that had git access or mounted the source code from the host and included the game itself.

There is also a new multi stage build option that might be good to try. https://docs.docker.com/engine/userguide/eng-image/multistage-build/

jrepp avatar Aug 26 '17 19:08 jrepp

So if you build the API container now it will push the packaged binaries into the build-mount. In the current setup this allows game/run-tests.sh from the game folder. You can also do the same thing by hand from the dev/run.sh as shown below.

Unfortunately the game is currently failing to start correctly in the container. I'll need to investigate more on Monday AM PST. Looks like a missing map parameter.

I just threw this docker project together and am still figuring out things so any input is appreciated :)

jrepp@jrepptu:~/s2client-docker$ docker volume ls
DRIVER              VOLUME NAME
local               ae74607d12a0bc5547f2d64f2543754f44637919710f3c6885c5fa0a5feeae2b
local               build-mount

jrepp@jrepptu:~/s2client-docker/dev$ ./run.sh
root@0dcac97f4402:/s2client-api# ls /build-mount/
all_tests        bot_simple        libSDL2.a           libprotobuf.a  libsc2protocol.a  replay
annoying_helper  echo_actions      libSDL2main.a       libprotoc.a    libsc2renderer.a  s2client-api-3.16.1.tgz
bot_micro        feature_layers    libcivetweb.a       libsc2api.a    libsc2utils.a     s2client-api-3.16.1.tgz.md5sum
bot_mp           intermediate_bot  libprotobuf-lite.a  libsc2lib.a    protoc            tutorial

root@be7e256ab3cc:/build-mount# ./all_tests -e /SC2/3.16.1/StarCraftII/Versions/Base55958/SC2_x64
Running test: sc2::TestAbilityRemap
Launched SC2 (/SC2/3.16.1/StarCraftII/Versions/Base55958/SC2_x64), PID: 18
Version: B55958 (SC2.3.16)
Build: Jul 31 2017 13:19:41
Command Line: '"/SC2/3.16.1/StarCraftII/Versions/Base55958/SC2_x64" -listen 127.0.0.1 -port 8167 -displayMode 0 -simulationSpeed 0 -windowwidth 1024 -windowheight 768 -windowx 100 -windowy 200'
Starting up...
Startup Phase 1 complete
Startup Phase 2 complete
Creating stub renderer...
Listening on: 127.0.0.1:8167 (8167)
Startup Phase 3 complete. Ready for commands.
Waiting for connection.
Connected to 127.0.0.1:8167
CreateGame request returned an error code: Invalid Map Path
CreateGame request returned error details: map_path file doesn't exist.
all_tests: /s2client-api/src/sc2api/sc2_coordinator.cc:483: bool sc2::CoordinatorImp::StartGame(): Assertion `is_game_created' failed.
Aborted (core dumped)

jrepp avatar Aug 27 '17 05:08 jrepp