/
funcSetImageBuildOptionsExtraHosts.go
48 lines (47 loc) · 1.15 KB
/
funcSetImageBuildOptionsExtraHosts.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
45
46
47
48
package iotmakerdockerbuilder
// SetImageBuildOptionsExtraHosts
//
// English:
//
// Add hostname mappings at build-time. Use the same values as the docker client --add-host
// parameter.
//
// Input:
// values: hosts to mapping
//
// Example:
//
// values = []string{
// "somehost:162.242.195.82",
// "otherhost:50.31.209.229",
// }
//
// An entry with the ip address and hostname is created in /etc/hosts inside containers for this
// build, e.g:
//
// 162.242.195.82 somehost
// 50.31.209.229 otherhost
//
// Português:
//
// Adiciona itens ao mapa de hostname durante o processo de construção da imagem. Use os mesmos
// valores que em docker client --add-host parameter.
//
// Entrada:
// values: hosts para mapeamento
//
// Exemplo:
//
// values = []string{
// "somehost:162.242.195.82",
// "otherhost:50.31.209.229",
// }
//
// Uma nova entrada com o endereço ip e hostname será criada dentro de /etc/hosts do container.
// Exemplo:
//
// 162.242.195.82 somehost
// 50.31.209.229 otherhost
func (e *ContainerBuilder) SetImageBuildOptionsExtraHosts(values []string) {
e.buildOptions.ExtraHosts = values
}