-
Notifications
You must be signed in to change notification settings - Fork 1
/
funcImageListExposedPorts.go
44 lines (41 loc) · 1.19 KB
/
funcImageListExposedPorts.go
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
40
41
42
43
44
package iotmakerdockerbuilder
import (
"github.com/docker/go-connections/nat"
"github.com/helmutkemper/util"
)
// ImageListExposedPorts
//
// English:
//
// Lists all the ports defined in the image to be exposed.
//
// Output:
// portList: List of ports exposed on image creation. (Dockerfile expose port)
// err: standard error object
//
// Note:
//
// * The ports exposed in the creation of the container can be defined by
// SetOpenAllContainersPorts(), AddPortToChange() and AddPortToExpose();
// * By default, all doors are closed.
//
// Português:
//
// Lista todas as portas definidas na imagem para serem expostas.
//
// Saída:
// portList: Lista de portas expostas na criação da imagem. (Dockerfile expose port)
// err: Objeto de erro padrão
//
// Nota:
//
// * As portas expostas na criação do container podem ser definidas por SetOpenAllContainersPorts(),
// AddPortToChange() e AddPortToExpose();
// * Por padrão, todas as portas ficam fechadas.
func (e *ContainerBuilder) ImageListExposedPorts() (portList []nat.Port, err error) {
portList, err = e.dockerSys.ImageListExposedPortsByName(e.imageName)
if err != nil {
util.TraceToLog()
}
return
}