We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db3c93a commit 6503e57Copy full SHA for 6503e57
1 file changed
dev/deploy-to-container/cli.js
@@ -84,12 +84,16 @@ async function main () {
84
const containers = await dock.listContainers({ all: true })
85
for (const container of containers) {
86
if (container.Names.includes(`/dt-db-${branch}`) || container.Names.includes(`/dt-app-${branch}`)) {
87
+ const isDbContainer = container.Names.includes(`/dt-db-${branch}`)
88
console.info(`Terminating old container ${container.Id}...`)
89
const oldContainer = dock.getContainer(container.Id)
90
if (container.State === 'running') {
91
await oldContainer.stop({ t: 5 })
92
}
- await oldContainer.remove({ force: true })
93
+ await oldContainer.remove({
94
+ force: true,
95
+ v: isDbContainer
96
+ })
97
98
99
console.info('Existing containers with same name have been terminated.')
0 commit comments