There is an example to start a container that listen on port 8080, run as a Xray server like below:
docker run -d -p 8080:8080 --name xray --restart=always -v /path/to/config.json:/root/config.json lentin/xray-docker
Some examples of uses for Xray-core https://github.com/XTLS/Xray-examples