@flowfuse/driver-docker 2.2.0 → 2.3.0
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/CHANGELOG.md +8 -0
- package/docker.js +8 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/docker.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const fs = require('fs')
|
|
2
1
|
const got = require('got')
|
|
3
2
|
const Docker = require('dockerode')
|
|
4
3
|
|
|
@@ -90,7 +89,7 @@ const createContainer = async (project, domain) => {
|
|
|
90
89
|
contOptions.Env.push('FORGE_LOG_PASSTHROUGH=true')
|
|
91
90
|
}
|
|
92
91
|
|
|
93
|
-
if (this._app.config.driver.options?.privateCA
|
|
92
|
+
if (this._app.config.driver.options?.privateCA) {
|
|
94
93
|
contOptions.Binds = [
|
|
95
94
|
`${this._app.config.driver.options.privateCA}:/usr/local/ssl-certs/chain.pem`
|
|
96
95
|
]
|
|
@@ -99,8 +98,13 @@ const createContainer = async (project, domain) => {
|
|
|
99
98
|
|
|
100
99
|
const containerList = await this._docker.listImages()
|
|
101
100
|
let containerFound = false
|
|
101
|
+
let stackName = stack.container
|
|
102
|
+
// add ":latest" to stack containers with no tag
|
|
103
|
+
if (stackName.indexOf(':') === -1) {
|
|
104
|
+
stackName = stackName + ':latest'
|
|
105
|
+
}
|
|
102
106
|
for (const cont of containerList) {
|
|
103
|
-
if (cont.RepoTags.includes(
|
|
107
|
+
if (cont.RepoTags.includes(stackName)) {
|
|
104
108
|
containerFound = true
|
|
105
109
|
break
|
|
106
110
|
}
|
|
@@ -475,7 +479,7 @@ module.exports = {
|
|
|
475
479
|
const properties = {
|
|
476
480
|
cpu: 10,
|
|
477
481
|
memory: 256,
|
|
478
|
-
container: 'flowfuse/node-red',
|
|
482
|
+
container: 'flowfuse/node-red:latest',
|
|
479
483
|
...this._app.config.driver.options?.default_stack
|
|
480
484
|
}
|
|
481
485
|
|