Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseDockerPS ¶
ParseDockerPS parses the output of:
docker ps --filter "name=cell-" --format "{{.Names}}\t{{.Ports}}"
and returns a map of AppName -> RDP host port.
func ParseInspectPort ¶
ParseInspectPort extracts the host port for container port 3389 from docker inspect JSON output.
Types ¶
type ContainerMatch ¶
type ContainerMatch struct {
Name string // full container name, e.g. "cell-devcell-73-run"
AppName string // stripped name, e.g. "devcell-73"
Port string // RDP host port
}
ContainerMatch holds data about a container with RDP port published.
func FindContainersByBind ¶
func FindContainersByBind(inspectJSON, hostDir string) ([]ContainerMatch, error)
FindContainersByBind parses docker inspect JSON (one or many containers) and returns all that have hostDir as the source of a bind mount and have port 3389 published.
Click to show internal directories.
Click to hide internal directories.