Sign inSign up

ivangabriele/dockfish

By ivangabriele

•Updated over 1 year ago

Server/Cloud-ready Stockfish Docker image.

Image
Web servers
0

6.3K

ivangabriele/dockfish repository overview

⁠DockFish - Stockfish Server Docker Image

img-docker img-github-actions

Server/Cloud-ready Stockfish Docker image based on slim Node Debian⁠ image including:

This image is intented for people who want to setup their own Stockfish Server using own server or cloud instance.

Docker Hub prebuilt images⁠ are automatically updated on a daily basis.

You have to communicate with this server via WebSockets.
You can send 2 event types: auth:authenticate and uci:command.
You can receive 3 event types: auth:authenticated, auth:unauthenticated and uci:response.
All sent and received events look like that: { type: string } or { type: string, payload: string }.

Check the client example⁠ to understand how that works.



⁠Example

You can check a very simple implementation example in examples/simple⁠ using this Docker image. You'll find a README.md there explaining how to it works and how to run it locally.

⁠Docker Environment Variables

⁠API_TOKEN

If you set the API_TOKEN, sent socket events will need to be authenticated using this token. Otherwise anybody can listen and emit to your server.

Undefined by default.

⁠PORT

REQUIRED

This is the server exposed port to emit and listen socket events.

⁠Docker Arguments

⚠️ The arguments can ONLY be used if you build your image DIRECTLY from the ./dockerfiles directory⁠ and not via the Docker Hub images that are prebuilt using the default values declared below.

⁠ARCH

Architecture target while building:

Default value: x86-64-bmi2

  • apple-silicon: Apple silicon ARM64
  • armv7-neon: ARMv7 32-bit with popcnt and neon
  • armv7: ARMv7 32-bit
  • armv8: ARMv8 64-bit with popcnt and neon
  • e2k: Elbrus 2000
  • general-32: unspecified 32-bit
  • general-64: unspecified 64-bit
  • ppc-32: PPC 32-bit
  • ppc-64: PPC 64-bit
  • riscv64: RISC-V 64-bit
  • x86-32-sse2: x86 32-bit with sse2 support
  • x86-32-sse41-popcnt: x86 32-bit with sse41 and popcnt support
  • x86-32: x86 32-bit generic (with mmx and sse support)
  • x86-64-avx2: x86 64-bit with avx2 support
  • x86-64-avx512: x86 64-bit with avx512 support
  • x86-64-avxvnni: x86 64-bit with avxvnni support
  • x86-64-bmi2: x86 64-bit with bmi2 support
  • x86-64-modern: common modern CPU, currently x86-64-sse41-popcnt
  • x86-64-sse3-popcnt: x86 64-bit with sse3 and popcnt support
  • x86-64-sse41-popcnt: x86 64-bit with sse41 and popcnt support
  • x86-64-ssse3: x86 64-bit with ssse3 support
  • x86-64-vnni256: x86 64-bit with vnni support 256bit wide
  • x86-64-vnni512: x86 64-bit with vnni support 512bit wide
  • x86-64: x86 64-bit generic (with sse2 support)

⁠Sanity Check

Once you have deployed Dockfish either locally or remotely, you can check if the server is running by visiting the /check path.

You should normally see a plain text body stating: "Dockfish is up and running.".

⁠Contribute

X is Stockfish version.

⁠Prerequisites
⁠Build
make build-X

Example: make build-15.

⁠Run
make run-X

Example: make run-15.


Tag summary

Content type

Image

Digest

sha256:c9c03c480…

Size

261.5 MB

Last updated

over 1 year ago

docker pull ivangabriele/dockfish:15