2016-07-19 17:21:06 +00:00
|
|
|
"use strict";
|
2017-03-28 23:01:37 +00:00
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
2016-07-19 17:21:06 +00:00
|
|
|
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-03-28 23:01:37 +00:00
|
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnNuaXBwZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtZG9ja2VyLnNuaXBwZXRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsK0NBQStDO0FBT3BDLFFBQUEsaUJBQWlCLEdBQUcsQ0FBQyxVQUE2QjtJQUN6RCxJQUFJLFlBQVksR0FBRyxVQUFVLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNsRCxJQUFJLGFBQWEsR0FBVSxFQUFFLENBQUM7SUFDOUIsR0FBRyxDQUFBLENBQUMsSUFBSSxVQUFVLElBQUksWUFBWSxDQUFDLENBQUEsQ0FBQztRQUNoQyxFQUFFLENBQUEsQ0FBQyxDQUFDLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUEsQ0FBQztZQUN2QixhQUFhLEdBQUcsYUFBYSxHQUFHLEdBQUcsQ0FBQztRQUN4QyxDQUFDO1FBQ0QsYUFBYSxHQUFHLGFBQWEsR0FBRyxHQUFHLEdBQUcsVUFBVSxHQUFHLEdBQUcsQ0FBQztJQUMzRCxDQUFDO0lBQUEsQ0FBQztJQUNGLE1BQU0sQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUM7ZUFDakMsVUFBVSxDQUFDLFNBQVM7Ozs7ZUFJcEIsYUFBYTtLQUN2QixDQUFDLENBQUM7QUFDUCxDQUFDLENBQUEifQ==
|