mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-04 14:43:01 +02:00
confd: add support for publishing container ports
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -52,6 +52,9 @@ static int add(const char *name, struct lyd_node *cif)
|
||||
LYX_LIST_FOR_EACH(lyd_child(cif), node, "search")
|
||||
fprintf(fp, " --dns-search %s", lyd_get_value(node));
|
||||
|
||||
LYX_LIST_FOR_EACH(lyd_child(cif), node, "publish")
|
||||
fprintf(fp, " -p %s", lyd_get_value(node));
|
||||
|
||||
fprintf(fp, " create %s %s", name, image);
|
||||
|
||||
LYX_LIST_FOR_EACH(lyd_child(cif), node, "network") {
|
||||
|
||||
@@ -116,7 +116,11 @@ module infix-containers {
|
||||
}
|
||||
|
||||
leaf-list publish {
|
||||
description "Publish container port, or a range of ports, to the host.";
|
||||
description "Publish container port, or a range of ports, to the host.
|
||||
Syntax: [[ip:][hostPort]:]containerPort[/protocol]
|
||||
Sample: 8080:80 -- forward tcp port 8080 to container port 80
|
||||
69:69/udp -- forward udp port 69 to container port 69
|
||||
127.0.0.1:8080:80 -- forward only from loopback interface";
|
||||
type string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user