Skip to content

Commit

Permalink
fix(node): use shorter run-commands options for docker-build (#15224)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Feb 24, 2023
1 parent b488f64 commit c08823a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('setupDockerGenerator', () => {
dependsOn: ['build'],
executor: 'nx:run-commands',
options: {
commands: ['docker build -f api/Dockerfile . -t api'],
command: 'docker build -f api/Dockerfile . -t api',
},
},
})
Expand All @@ -50,7 +50,7 @@ describe('setupDockerGenerator', () => {
dependsOn: ['build'],
executor: 'nx:run-commands',
options: {
commands: ['docker build -f Dockerfile . -t api'],
command: 'docker build -f Dockerfile . -t api',
},
},
})
Expand Down
10 changes: 4 additions & 6 deletions packages/node/src/generators/setup-docker/setup-docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,10 @@ export function updateProjectConfig(tree: Tree, options: SetUpDockerOptions) {
dependsOn: [`${options.buildTarget}`],
executor: 'nx:run-commands',
options: {
commands: [
`docker build -f ${joinPathFragments(
projectConfig.root,
'Dockerfile'
)} . -t ${options.project}`,
],
command: `docker build -f ${joinPathFragments(
projectConfig.root,
'Dockerfile'
)} . -t ${options.project}`,
},
};

Expand Down

0 comments on commit c08823a

Please sign in to comment.