@cloud-cli/dx 1.8.0 → 1.8.1
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/dist/containers.js +5 -3
- package/dist/store.js +1 -1
- package/package.json +1 -1
package/dist/containers.js
CHANGED
|
@@ -95,10 +95,12 @@ export async function stopContainer(options, { run }) {
|
|
|
95
95
|
if (!name) {
|
|
96
96
|
throw new Error('Name is required');
|
|
97
97
|
}
|
|
98
|
-
const container = await findContainer(name);
|
|
99
98
|
await exec('docker', ['stop', '-t', '5', name]);
|
|
100
99
|
await exec('docker', ['rm', name]);
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
const containers = [await findContainer(name)].filter(Boolean);
|
|
101
|
+
for (const container of containers) {
|
|
102
|
+
await run('dns.remove', { domain: container.host });
|
|
103
|
+
await run('dns.reload', {});
|
|
104
|
+
}
|
|
103
105
|
return true;
|
|
104
106
|
}
|
package/dist/store.js
CHANGED
|
@@ -47,7 +47,7 @@ export async function addContainer(options) {
|
|
|
47
47
|
const host = options.host;
|
|
48
48
|
const container = new Container({ name, image, volumes, ports, host });
|
|
49
49
|
const id = await container.save();
|
|
50
|
-
container.id = id;
|
|
50
|
+
container.id = Number(id);
|
|
51
51
|
return container;
|
|
52
52
|
}
|
|
53
53
|
export async function removeContainer(options) {
|