1 | <?php |
||
5 | class DnsDockResolver implements ContainerAddressResolver |
||
6 | { |
||
7 | /** |
||
8 | * {@inheritdoc} |
||
9 | */ |
||
10 | public function getDnsByContainerNameAndImage($containerName, $imageName) |
||
11 | { |
||
12 | $imageName = $this->stripTagNameFromImageName($imageName); |
||
13 | $imageName = $this->stripSlashFromImageName($imageName); |
||
14 | |||
15 | return [ |
||
16 | $imageName.'.docker', |
||
17 | $containerName.'.'.$imageName.'.docker', |
||
18 | ]; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @param string $imageName |
||
23 | * |
||
24 | * @return string |
||
25 | */ |
||
26 | private function stripTagNameFromImageName($imageName) |
||
34 | |||
35 | private function stripSlashFromImageName($imageName) |
||
43 | } |
||
44 |