Concepts
Dockerizing your Session Backend code

Dockerizing your session backend

You can use any language or framework in a session backend. If you can run it in a Docker container, you can run it on Jamsocket.

Here are a few details to keep in mind when Dockerizing your session backend code:

1. Your session backend container must run a server that listens on port 8080 and binds to the local IPv4 address 0.0.0.0.

If you are using a framework or an existing Docker container, you may need to explicitly tell it to listen on port 8080 and set the host to 0.0.0.0.

2. Your session backend container must be built to run on an x86 architecture.

If you use the --dockerfile flag when pushing to Jamsocket, the Jamsocket CLI will build your image for the correct platform. For example,

npx jamsocket push [SERVICE NAME] --dockerfile path/to/Dockerfile

If instead you are building your own docker image, you should be sure to build for the correct platform so that the resulting image can run on Jamsocket's VMs. For example,

docker build --platform=linux/amd64 ...
💡

Session backends may encounter an ErrorStarting status if their images are built for the wrong platform.

Jamsocket is built by Drifting in Space.