Modify HTTP and HTTPS ports for Docker on Mac

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. We have 2 scenarios.

If no cloud data need to be saved, then

  1. stop sc-cloud container

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

    sudo docker container rm sc-cloud
  3. re-ctreate sc-cloud with HTTP 44 and HTTPS 344

    docker run --name sc-cloud -it -p 44:80 -p 344:443 -p 1935:1935 -p 8000:8000/udp -p 7001-7005:7001-7005/udp -d magewell/sc-cloud

If the cloud data need to be saved, then

  1. stop sc-cloud container

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

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

    sudo docker container rm sc-cloud
  4. re-ctreate sc-cloud with HTTP 44 and HTTPS 344

    docker run --name sc-cloud -it -p 44:80 -p 344:443 -p 1935:1935 -p 8000:8000/udp -p 7001-7005:7001-7005/udp -d temp/sc-cloud