Skip to content

Commit

Permalink
Create docker network if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
pflooky committed Jul 1, 2024
1 parent 875c874 commit 358e80b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/data-caterer.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,15 @@ function runDataCaterer(
'my-plan.yaml',
dataCatererEnv
)
// Check if network is created, create if it isn't
const network_details = execSync(
'docker network ls | grep insta-infra_default'
)
if (network_details.length === 0) {
core.debug('Creating docker network: insta-infra_default')
execSync('docker create network insta-infra_default')
}

core.debug(
`Running docker command for data-caterer, command=${dockerRunCommand}`
)
Expand Down

0 comments on commit 358e80b

Please sign in to comment.