forked from helmutkemper/iotmaker.docker.builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfuncAddPortToExpose.go
More file actions
39 lines (37 loc) · 1.09 KB
/
Copy pathfuncAddPortToExpose.go
File metadata and controls
39 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package iotmakerdockerbuilder
// AddPortToExpose
//
// English:
//
// Defines the port to be exposed on the network
//
// Input:
// value: port in the form of a numeric string
//
// Note:
//
// * The ports exposed in the creation of the container can be defined by
// SetOpenAllContainersPorts(), AddPortToChange() and AddPortToExpose();
// * By default, all doors are closed;
// * The ImageListExposedPorts() function returns all ports defined in the image to be exposed.
//
// Português:
//
// Define a porta a ser expostas na rede
//
// Entrada:
// value: porta na forma de string numérica
//
// Nota:
//
// * As portas expostas na criação do container pode ser definidas por SetOpenAllContainersPorts(),
// AddPortToChange() e AddPortToExpose();
// * Por padrão, todas as portas ficam fechadas;
// * A função ImageListExposedPorts() retorna todas as portas definidas na imagem para serem
// expostas.
func (e *ContainerBuilder) AddPortToExpose(value string) {
if e.openPorts == nil {
e.openPorts = make([]string, 0)
}
e.openPorts = append(e.openPorts, value)
}