Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit ae9c221

Browse files
committed
update example, add an example pod for portmapping
examples/port-mapping.pod ``` { "id": "port-mapping-test", "containers" : [{ "name": "pmtest", "image": "busybox:latest", "command": ["/bin/nc", "-l", "-p", "1300"] }], "resource": { "vcpu": 1, "memory": 128 }, "portmappings": [{ "containerport": "1300-1310", "hostport": "3000-3010", "protocol": "tcp" }] } ``` Signed-off-by: Wang Xu <[email protected]>
1 parent c98129e commit ae9c221

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

examples/file-mapping.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"volumes": [{
1818
"name": "resolv.conf",
1919
"source": "/etc/resolv.conf",
20-
"driver": "vfs"
20+
"format": "vfs"
2121
}],
2222
"tty": true
2323
}

examples/port-mapping.pod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"id": "port-mapping-test",
3+
"containers" : [{
4+
"name": "pmtest",
5+
"image": "busybox:latest",
6+
"command": ["/bin/nc", "-l", "-p", "1300"]
7+
}],
8+
"resource": {
9+
"vcpu": 1,
10+
"memory": 128
11+
},
12+
"portmappings": [{
13+
"containerport": "1300-1310",
14+
"hostport": "3000-3010",
15+
"protocol": "tcp"
16+
}]
17+
}
18+

examples/with-volume.pod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@
3636
"volumes": [{
3737
"name": "log",
3838
"source": "",
39-
"driver": ""
39+
"format": ""
4040
},{
4141
"name": "tmp",
4242
"source": "/tmp",
43-
"driver": "vfs"
43+
"format": "vfs"
4444
}],
4545
"tty": true
4646
}

0 commit comments

Comments
 (0)