UNPKG

buildahcker

Version:

Buildahcker is a node.js library to create and run commands in OCI (Open Container Initiative) container images (or docker images), based on Buildah and a hash-based cache. It also contains utilities to easily create a partitioned bootable disk image of a

18 lines (17 loc) 937 B
import type { Writable } from "stream"; import type { ImageOrContainer } from "../container"; import type { ContainerCache } from "../containerCache"; import { DiskFile } from "../steps"; export type SSHKeyType = "dsa" | "ecdsa" | "ecdsa-sk" | "ed25519" | "ed25519-sk" | "rsa"; export declare const defaultSSHKeyGenTypes: SSHKeyType[]; export interface SSHKeyGenConfig<T extends SSHKeyType, P extends string, S extends string> { outputFolder: string; types?: T[]; prefix?: P; suffix?: S; opensshSource?: ImageOrContainer; containerCache?: ContainerCache; apkCache?: string; logger?: Writable; } export declare const sshKeygen: <T extends SSHKeyType = "ed25519", P extends string = "ssh_host_", S extends string = "_key">({ outputFolder, opensshSource, types, prefix, suffix, containerCache, apkCache, logger, }: SSHKeyGenConfig<T, P, S>) => Promise<Record<`${P}${T}${S}.pub` | `${P}${T}${S}`, DiskFile>>;