2016-07-19 17:21:06 +00:00
|
|
|
"use strict";
|
|
|
|
const plugins = require("./npmdocker.plugins");
|
|
|
|
exports.dockerfileSnippet = (optionsArg) => {
|
|
|
|
let commandArray = optionsArg.command.split(/\s/);
|
|
|
|
let commandString = "";
|
|
|
|
for (let stringItem of commandArray) {
|
|
|
|
if (!(commandString == "")) {
|
|
|
|
commandString = commandString + ",";
|
|
|
|
}
|
|
|
|
commandString = commandString + '"' + stringItem + '"';
|
|
|
|
}
|
|
|
|
;
|
|
|
|
return plugins.smartstring.indent.normalize(`
|
|
|
|
FROM ${optionsArg.baseImage}
|
2016-07-28 22:52:30 +00:00
|
|
|
COPY ./buildContextDir /workspace
|
2016-07-19 17:21:06 +00:00
|
|
|
WORKDIR /workspace
|
|
|
|
ENV CI=true
|
|
|
|
CMD [${commandString}];
|
|
|
|
`);
|
|
|
|
};
|
2017-02-11 19:23:10 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnNuaXBwZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtZG9ja2VyLnNuaXBwZXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBK0M7QUFPcEMsUUFBQSxpQkFBaUIsR0FBRyxDQUFDLFVBQTZCO0lBQ3pELElBQUksWUFBWSxHQUFHLFVBQVUsQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ2xELElBQUksYUFBYSxHQUFVLEVBQUUsQ0FBQztJQUM5QixHQUFHLENBQUEsQ0FBQyxJQUFJLFVBQVUsSUFBSSxZQUFZLENBQUMsQ0FBQSxDQUFDO1FBQ2hDLEVBQUUsQ0FBQSxDQUFDLENBQUMsQ0FBQyxhQUFhLElBQUksRUFBRSxDQUFDLENBQUMsQ0FBQSxDQUFDO1lBQ3ZCLGFBQWEsR0FBRyxhQUFhLEdBQUcsR0FBRyxDQUFDO1FBQ3hDLENBQUM7UUFDRCxhQUFhLEdBQUcsYUFBYSxHQUFHLEdBQUcsR0FBRyxVQUFVLEdBQUcsR0FBRyxDQUFDO0lBQzNELENBQUM7SUFBQSxDQUFDO0lBQ0YsTUFBTSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQztlQUNqQyxVQUFVLENBQUMsU0FBUzs7OztlQUlwQixhQUFhO0tBQ3ZCLENBQUMsQ0FBQztBQUNQLENBQUMsQ0FBQSJ9
|