@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 CHANGED
@@ -1,3 +1,11 @@
1
+ #### 2.3.0: Release
2
+
3
+ - Only pull stack container if missing (#89) @hardillb
4
+
5
+ #### 2.2.1: Release
6
+
7
+ - Fix loading private CA certs in Instances (#87) @hardillb
8
+
1
9
  #### 2.2.0: Release
2
10
 
3
11
  - Pull missing Stack containers on first use (#85) @hardillb
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 && fs.existsSync(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(stack.container)) {
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowfuse/driver-docker",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Docker driver for FlowFuse",
5
5
  "main": "docker.js",
6
6
  "scripts": {