Skip to main content

Container ports (service ports)

TWSC interactive containers provide 5 target ports, port 22, 8888, 5000, 5001, 5002, for external services running on the containers.

By default, the container has SSH server run on port 22 and Jupyter Notebook run on port 8888 with association done automatically, so you can use both ways to connect and operate the container immediately after the container is created.

The custom target ports are: 5000, 5001, and 5002. You can set the daemon of the service running on a container to one of the target ports, and associate it with the public port. After that, the system will configure a corresponding public port (50000 ~ 60000). You can expose your service with using the public IP and the public port. (e.g., AI inference or Website service)

info
  • Available container ports for external access: 80、443、22。
  • Communication beteween containers: Support container communication within the same project and communication between containers in different projects is not supported.

Prerequisites

  • Create Interactive Containers.
  • If you choose to use TWSC portal, after the container is created, please click the container you want to connect to on the Interactive Container Management page and enter the Interactive Container Details page.
  • If you choose to use TWCC CLI operation, please obtain the container's ID first.

View service port information

By default, SSH runs on target port 22; Jupyter Notebook runs on target port 8888. (Public ports are all allocated by the system).

The following methods indicates how to view the external service port information associated with the container.

Scroll down the page to the Networks & Connection section > Port. The associated service port information is displayed at the bottom left.


Associate the service port

You can associate the container with target ports 5000, 5001, 5002, and the system will configure a corresponding public port (50000 ~ 60000). You can provide the external services through this mechanism. (e.g., AI inference or Website service).

  • Click ASSOCIATE service port ➡️ Select the target port of the service daemon 5002 ➡️ Click OK.

  • After that, the system will configure a public port (54708) corresponding to the target port (5002).


Dissociate the service port

If the container no longer provides external services, you can dissociate the service port.

In the Interactive Container Details page, click "DISSOCIATE".

Then check the port number to be dissociated, and click OK to successfully dissociate.