Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
Kowshik Prakasam and Pieter Noordhuis edited this page Feb 28, 2013 · 1 revision

Set up a port mapping on the host to forward traffic to a specific port to a container.

TODO Link to page explaining how networking works.

Request

  • handle: Container handle.
  • host_port: External port to be mapped. If not specified, a port will be acquired from the server's port pool. If specified, the user is expected to manage port availability.
  • container_port: Port on the container's interface that traffic should be forwarded to. If not specified, the port will be the same as host_port, whether it is specified or not.

Response

  • host_port: External port that was mapped.
  • container_port: Port on the container's interface that traffic will be forwarded to.

Errors

  • When handle does not refer to a container.
  • When no port can be acquired from the server's port pool.

Definition

package warden;

message NetInRequest {
  required string handle = 1;

  optional uint32 host_port      = 3;
  optional uint32 container_port = 2;
}

message NetInResponse {
  required uint32 host_port      = 1;
  required uint32 container_port = 2;
}

Clone this wiki locally