This repo provides a Dockerfile that can be used to build a docker image for the MCP server. Much more handy for production scenarios, portability, reproducibility, etc.
Basic:
# From the repository root
docker build -t MY_IMG:MY_TAG .You can also pass in the expected host port at build time:
docker build --build-arg HOST_PORT=8500 -t MY_IMG_ARG:MY_TAG_ARG .The docker container expects an .env file to be passed in at runtime.
Basic:
# From the repository root
docker run -d -p 8134:8134 --env-file .env --name YOUR_NAME MY_IMG:MY_TAGIf you set a non-default port at build time, make sure you set that in your .env!
docker run -d -p 8500:8500 --env-file .env --name YOUR_NAME MY_IMG_ARG:MY_TAG_ARG
# In this case the .env should also have an entry for
HOST_PORT=8500Usage is the exact same as when it was run locally.