Skip to content

Feature Request: CLI flags for custom build/start commands and environment variables #27

@pietrozullo

Description

@pietrozullo

Feature Request

First off, great tool! The auto-detection and multi-runtime support is exactly what I was looking for as a nixpacks alternative.

Problem

Currently, the generated Dockerfile uses ARG for build/start commands which requires passing --build-arg at docker build time. There's also no way to inject custom environment variables into the generated Dockerfile.
It would be awesome to have a way to pass:

  1. Custom start command: --start-cmd "node server.js"
  2. Custom build command: --build-cmd "npm run build:prod"
  3. Custom install command: --install-cmd "npm ci --production"
  4. Environment variables: --env KEY=value (repeatable flag)
  5. Custom port: --port 3000

Example Usage

new-dockerfile --write \
  --start-cmd "node dist/server.js" \
  --build-cmd "npm run build" \
  --env "NODE_ENV=production" \
  --env "API_URL=https://api.example.com" \
  --port 8080

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions