@adpt/cloud
Version:
AdaptJS cloud component library
52 lines • 1.66 kB
TypeScript
import Adapt, { BuiltinProps } from "@adpt/core";
import { DockerBuildOptions } from "../docker";
import { Environment } from "../env";
/**
* Props for {@link nodejs.LocalNodeImage}
*
* @public
*/
export interface LocalNodeImageProps extends Partial<BuiltinProps> {
/** Source directory for the Node.js program */
srcDir: string;
/** Build options */
options?: NodeImageBuildOptions;
}
/**
* Locally builds a docker image for a {@link https://www.nodejs.org | Node.js} program.
*
* @remarks
* Implements {@link docker.DockerImageInstance}.
*
* See {@link nodejs.LocalNodeImageProps}.
*
* @public
*/
export declare function LocalNodeImage(props: LocalNodeImageProps): Adapt.AdaptElementOrNull;
/**
* Options controlling how the Docker image is built in
* {@link nodejs.LocalNodeImage}.
* @public
*/
export interface NodeImageBuildOptions extends DockerBuildOptions {
/**
* Package manager to use in build steps in the generated Dockerfile
* that builds {@link nodejs.LocalNodeImage}.
*/
packageManager?: "npm" | "yarn" | string;
/**
* Scripts that are defined in your
* {@link https://docs.npmjs.com/files/package.json | package.json file}
* that should be run during the image build.
*/
runNpmScripts?: string | string[];
/**
* Environment variables that should be present during docker build
*
* @remarks
* This adds an `ARG <varName>` line to the Dockerfile for every variable in env, and sets the
* variable in the environment before running `docker build`.
*/
buildArgs?: Environment;
}
//# sourceMappingURL=LocalNodeImage.d.ts.map