tsdocker/ts/npmdocker.snippets.ts

17 lines
466 B
TypeScript
Raw Normal View History

2016-07-18 22:37:13 +00:00
import * as plugins from "./npmdocker.plugins";
export interface IDockerfileSnippet {
2017-04-02 12:48:23 +00:00
baseImage: string;
command: string;
2016-07-18 22:37:13 +00:00
}
2017-04-02 12:48:23 +00:00
export let dockerfileSnippet = (optionsArg: IDockerfileSnippet): string => {
return plugins.smartstring.indent.normalize(`
2016-07-18 22:37:13 +00:00
FROM ${optionsArg.baseImage}
2017-04-02 12:48:23 +00:00
RUN yarn global add npmdocker
COPY ./buildContextDir /workspace
2016-07-19 00:03:54 +00:00
WORKDIR /workspace
2016-07-19 17:21:06 +00:00
ENV CI=true
2017-04-02 12:48:23 +00:00
CMD ["npmdocker","runinside"];
`)
2016-07-18 22:37:13 +00:00
}