Open custom ports
Sometimes you may need to open custom ports to enable external access to specific services. This guide explains how to configure Docker to expose desired ports, such as 8081 and 8082, by adding -p arguments in the Docker setup. By following these steps, you can easily map internal GPU instance ports to external ones, creating flexible access points for applications, including SSH and Jupyter setups. Dive in to learn how to configure port forwarding for seamless remote access.
Add -p arguments in the docker create/run options box in the template configuration or image config editor pop-up menu. To open ports 8081 and 8082, use something like this:
This will result in additional arguments to docker create/run to expose those internal ports, which will be mapped to random external ports. Any ports exposed in these docker options are in addition to ports exposed through EXPOSE commands in the docker image, and the ports 22 or 8080 which may be opened automatically for SSH or Jupyter.
In this case, the public IP:port 184.144.235.158:51626
can be used to access anything you run on port 8081 inside the instance.