Modify ports for Docker on Windows

As host network is not for Windows, you need to use docker commands to modify HTTP and HTTPS ports.

Now, if we use HTTP port 80, HTTPS port 443, and we want to change 80 to 44, 443 to 344, UDP port group to 7001-7100 and 8000. We have 2 scenarios.

If no cloud data need to be saved, then

  1. stop sc-cloud container

    docker container stop sc-cloud
  2. delete sc-cloud

    docker container rm sc-cloud
  3. re-create sc-cloud

    docker run --name sc-cloud -it -v d:\data:/data -v d:\log:/log -p 44:80 -p 1935:1935 -p 344:443 -p 8000:8000/udp -p 7001-7100:7001-7100/udp -d magewell/sc-cloud

If the cloud data need to be saved, then

  1. stop sc-cloud container

    docker container stop sc-cloud
  2. save sc-cloud with a new name, temp for example.

    docker commit sc-cloud temp
  3. delete sc-cloud

    docker container rm sc-cloud
  4. re-create sc-cloud

    docker run --name sc-cloud -it -v d:\data:/data -v d:\log:/log -p 44:80 -p 1935:1935 -p 344:443 -p 8000:8000/udp -p 7001-7100:7001-7100/udp -d temp/sc-cloud