Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hardillb committed Feb 21, 2024
1 parent 6de9d4f commit d1bb0f3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ const createContainer = async (project, domain) => {
contOptions.Env.push('NODE_EXTRA_CA_CERTS=/usr/local/ssl-certs/chain.pem')
}


const containerList = await this._docker.listImages()
let containerFound = false
for (const cont of containerList) {
Expand All @@ -113,15 +112,19 @@ const createContainer = async (project, domain) => {
try {
await new Promise((resolve, reject) => {
this._docker.pull(stack.container, (err, stream) => {
this._docker.modem.followProgress(stream, onFinished)
function onFinished(err, output) {
if (!err) {
resolve(true)
return
if (!err) {
this._docker.modem.followProgress(stream, onFinished)
function onFinished (err, output) {
if (!err) {
resolve(true)
return
}
reject(err)
}
} else {
reject(err)
}
} )
})
})
} catch (err) {
this._app.log.debug(`Error pulling image ${stack.container} ${err.message}`)
Expand Down

0 comments on commit d1bb0f3

Please sign in to comment.