The purpose of this sample is to have a websocket server to be hosted on azure as a starting point.
- Build the container
docker build -f ./Dockerfile -t {youraccount}/multi-ws:1 .
In my case I created a container on docker hub and pushed it there
docker push {youraccount}/multi-ws:1
- Deploy container to Azure Container Instances
Read this short walkthrough how to create the instance and deploy the container
https://docs.microsoft.com/en-us/azure/container-instances/container-instances-quickstart
and don't forget to set expose port 80 through the portal or CLI.
- Call the websocket endpoint
To test the connection you can use wscat
.
https://github.com/websockets/wscat
wscat --connection ws://1.2.3.4/foo
wscat --connection ws://1.2.3.4/bar