import { SoftwareEnvironment } from '@stencila/schema'; import Generator from './Generator'; import IUrlFetcher from './IUrlFetcher'; /** * A Dockerfile generator that collects instructions from * all the other generators to allow for images that support * multiple languages. */ export default class DockerGenerator extends Generator { /** * The software environment for which a Dockerfile * will be generated */ environ: SoftwareEnvironment; /** * The child generators from which this 'super' generator * collects instructions. */ protected generators: Array; constructor(urlFetcher: IUrlFetcher, environ: SoftwareEnvironment, folder?: string); /** * Collect arrays of string from each child generator * and flatten them into an array of strings. * Used below for method overrides. * * @param func The child generator method to call */ private collect; /** * Join strings from each child generator * * @param func The child generator method to call */ private join; applies(): boolean; baseVersion(): string; envVars(sysVersion: string): Array<[string, string]>; aptKeysCommand(sysVersion: string): string | undefined; aptRepos(sysVersion: string): Array; aptPackages(sysVersion: string): Array; stencilaInstall(sysVersion: string): string | undefined; installFiles(sysVersion: string): Array<[string, string]>; installCommand(sysVersion: string): string | undefined; projectFiles(sysVersion: string): Array<[string, string]>; runCommand(sysVersion: string): string | undefined; }