Skip to content

Commit 9a73249

Browse files
committed
run docker-compose build with an optional --pull
1 parent 86a9726 commit 9a73249

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/compose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const buildShell = (run, name, compose, opts = {}) => ({
7777
* Run docker compose build
7878
*/
7979
exports.build = (compose, project, opts = {}) => {
80-
return buildShell('build', project, compose, {pull: _.isEmpty(opts.local)});
80+
return buildShell('build', project, compose, {pull: _.isEmpty(opts.local) || !_.isEmpty(opts.pullable)});
8181
};
8282

8383
/*

lib/router.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,8 @@ exports.eventWrapper = (name, daemon, events, data, run) => daemon.up()
3030
* Helper to route to build command
3131
*/
3232
exports.build = (data, compose) => {
33-
// Pull
34-
return retryEach(data, datum => compose('pull', datum))
35-
// then build
36-
.then(() => retryEach(data, datum => compose('build', datum)));
33+
// Build (with optional "--pull")
34+
return retryEach(data, datum => compose('build', datum));
3735
};
3836

3937
/*

0 commit comments

Comments
 (0)