nodevisor/packages/builder at main · nodevisor/nodevisor · GitHub
Skip to content

Latest commit

 

History

History

Folders and files

README.md

Nodevisor Logo

@nodevisor/builder

Abstract image builder interface for building and pushing container images.

Part of Nodevisor — TypeScript Infrastructure Automation Platform

Install

npm install @nodevisor/builder

Quick Start

import Builder from '@nodevisor/builder';

// Builder is abstract — use concrete implementations
// from @nodevisor/docker: DockerBuilder or NodeBuilder

Configuration

new Builder({
  arch: 'amd64',            // Target architecture: 'amd64' | 'arm64'
  context: './apps/api',     // Build context path
  args: { NODE_ENV: 'production' }, // Build arguments
  tags: ['latest', 'v1.0'], // Image tags
});

API

Abstract Method

build(image, registry, config)

Build and optionally push an image. Returns an array of built tags.

const tags = await builder.build('myapp', registry, {
  push: true,
  context: './apps/api',
  labels: { version: '1.0' },
});

Implementations

Class Package Description
DockerBuilder @nodevisor/docker Builds from an existing Dockerfile
NodeBuilder @nodevisor/docker Multi-stage Node.js builder (generates Dockerfile)

Related Packages

Documentation

Full documentation available at nodevisor.com/docs/packages/builder

License

Nodevisor uses a single O'Saasy license across all packages and applications. See the full terms in LICENSE.