presidium 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Docker.js +4 -2
- package/package.json +1 -1
package/Docker.js
CHANGED
|
@@ -1403,13 +1403,14 @@ class Docker {
|
|
|
1403
1403
|
* ```
|
|
1404
1404
|
*/
|
|
1405
1405
|
async initSwarm(address) {
|
|
1406
|
+
const port = address.split(':')[1]
|
|
1406
1407
|
const response = await this.http.post('/swarm/init', {
|
|
1407
1408
|
headers: {
|
|
1408
1409
|
'Content-Type': 'application/json',
|
|
1409
1410
|
},
|
|
1410
1411
|
body: JSON.stringify({
|
|
1411
1412
|
AdvertiseAddr: address,
|
|
1412
|
-
ListenAddr:
|
|
1413
|
+
ListenAddr: `0.0.0.0:${port}`,
|
|
1413
1414
|
}),
|
|
1414
1415
|
})
|
|
1415
1416
|
|
|
@@ -1451,12 +1452,13 @@ class Docker {
|
|
|
1451
1452
|
* ```
|
|
1452
1453
|
*/
|
|
1453
1454
|
async joinSwarm(address, options) {
|
|
1455
|
+
const port = address.split(':')[1]
|
|
1454
1456
|
const response = await this.http.post('/swarm/join', {
|
|
1455
1457
|
headers: {
|
|
1456
1458
|
'Content-Type': 'application/json',
|
|
1457
1459
|
},
|
|
1458
1460
|
body: JSON.stringify({
|
|
1459
|
-
ListenAddr:
|
|
1461
|
+
ListenAddr: `0.0.0.0:${port}`,
|
|
1460
1462
|
AdvertiseAddr: address,
|
|
1461
1463
|
RemoteAddrs: options.RemoteAddrs,
|
|
1462
1464
|
JoinToken: options.JoinToken,
|