Container Configuration

Configure Docker containers for Generic artifacts in Bluebricks.

Native Configuration Fields

Field
Type
Required
Description

type

string

Yes

Must be "generic"

path

string

Yes

Path to your source files (e.g., "./src")

image

string

No

Docker image to use (default: busybox:stable)

command

array

No

Command to run in container (default: image's CMD)

args

array

No

Arguments to pass to command

env_vars

object

No

Environment variables for container

Image Configuration

Basic Image Usage

{
  "native": {
    "type": "generic",
    "image": "python:3.11-slim"
  }
}

Custom Command and Args

Environment Variables

Common Configurations

Python Scripts

Node.js Applications

Bash Scripts

Multi-step Workflows

Advanced Configuration

Custom Entrypoint

Resource Constraints

Multi-language Scripts

Best Practices

Image Selection

  • Use specific tags: Never use latest in production

  • Choose minimal images: Alpine-based images are smaller

  • Consider security: Use official images from trusted sources

  • Optimize size: Use multi-stage builds for complex dependencies

Command Configuration

  • Be explicit: Always specify command and args for clarity

  • Use absolute paths: Reference /workspace/ for mounted files

  • Handle errors: Use set -e in bash scripts

  • Provide fallbacks: Include error handling in commands

Environment Variables

  • Use meaningful names: Choose descriptive variable names

  • Set defaults: Provide sensible default values

  • Document purpose: Explain what each variable does

  • Avoid secrets: Use Bluebricks secrets for sensitive data

Path Configuration

  • Use relative paths: Set path relative to package root

  • Organize files: Keep scripts in logical directory structure

  • Include dependencies: Put all required files in the path

  • Document structure: Explain file organization

See also

Last updated

Was this helpful?