source install: support dockerfileName and build options
This commit is contained in:
+5
-6
@@ -195,10 +195,9 @@ async function downloadImage(manifest) {
|
||||
await docker.downloadImage(manifest);
|
||||
}
|
||||
|
||||
async function buildLocalImage(app) {
|
||||
async function buildLocalImage(app, buildConfig) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
|
||||
// TODO some precondition checks like downloadImage maybe
|
||||
assert.strictEqual(typeof buildConfig, 'object');
|
||||
|
||||
const sourceFilePath = path.join(paths.APPS_DATA_DIR, app.id, 'source.tar.gz');
|
||||
|
||||
@@ -220,7 +219,7 @@ async function buildLocalImage(app) {
|
||||
}
|
||||
}
|
||||
|
||||
await docker.buildImage(app.manifest.dockerImage, sourceFilePath);
|
||||
await docker.buildImage(app.manifest.dockerImage, sourceFilePath, buildConfig);
|
||||
}
|
||||
|
||||
async function updateChecklist(app, newChecks, acknowledged = false) {
|
||||
@@ -484,7 +483,7 @@ async function installCommand(app, args, progressCallback) {
|
||||
// now we have the local package tarball, so lets build
|
||||
if (app.manifest.dockerImage.indexOf('local/') === 0) {
|
||||
await progressCallback({ percent: 75, message: 'Building image' });
|
||||
await buildLocalImage(app);
|
||||
await buildLocalImage(app, args.buildConfig);
|
||||
}
|
||||
|
||||
await progressCallback({ percent: 80, message: 'Creating container' });
|
||||
@@ -785,7 +784,7 @@ async function updateCommand(app, args, progressCallback) {
|
||||
// now we have the local package tarball, so lets build
|
||||
if (app.manifest.dockerImage.indexOf('local/') === 0) {
|
||||
await progressCallback({ percent: 65, message: 'Building image' });
|
||||
await buildLocalImage(app);
|
||||
await buildLocalImage(app, updateConfig.buildConfig);
|
||||
}
|
||||
|
||||
await progressCallback({ percent: 70, message: 'Creating container' });
|
||||
|
||||
Reference in New Issue
Block a user