import Doer from './Doer'; /** * Generates a Dockerfile for a `SoftwareEnvironment` instance */ export default class Generator extends Doer { /** * Generate a Dockerfile for a `SoftwareEnvironment` instance * * @param comments Should a comments be added to the Dockerfile? * @param stencila Should relevant Stencila language packages be installed in the image? */ generate(comments?: boolean, stencila?: boolean): string; /** * Does this generator apply to the package? */ applies(): boolean; /** * Name of the base image */ baseName(): string; /** * Version of the base image */ baseVersion(): string; /** * Get the version name for a base image * @param baseIdentifier The base image name e.g. `ubuntu:18.04` */ baseVersionName(baseIdentifier: string): string; /** * Generate a base image identifier */ baseIdentifier(): string; /** * A list of environment variables to set in the image * as `name`, `value` pairs * * @param sysVersion The Ubuntu system version being used */ envVars(sysVersion: string): Array<[string, string]>; /** * A Bash command to run to install required apt keys * * @param sysVersion The Ubuntu system version being used */ aptKeysCommand(sysVersion: string): string | undefined; /** * A list of any required apt repositories * * @param sysVersion The Ubuntu system version being used */ aptRepos(sysVersion: string): Array; /** * A list of any required apt packages * * @param sysVersion The Ubuntu system version being used */ aptPackages(sysVersion: string): Array; /** * A Bash command to run to install Stencila execution host package/s * * @param sysVersion The Ubuntu system version being used */ stencilaInstall(sysVersion: string): string | undefined; /** * A list of files that need to be be copied * into the image before running `installCommand` * * @param sysVersion The Ubuntu system version being used * @returns An array of [src, dest] tuples */ installFiles(sysVersion: string): Array<[string, string]>; /** * The Bash command to run to install required language packages * * @param sysVersion The Ubuntu system version being used */ installCommand(sysVersion: string): string | undefined; /** * The project's files that should be copied across to the image * * @param sysVersion The Ubuntu system version being used * @returns An array of [src, dest] tuples */ projectFiles(sysVersion: string): Array<[string, string]>; /** * The default command to run containers created from this image * * @param sysVersion The Ubuntu system version being used */ runCommand(sysVersion: string): string | undefined; }