Coder Social home page Coder Social logo

custom-build's Introduction

panda-build-image

The Build image is based on node:latest which is based on debian bookworm including dev tools as of time of writing middle 2024.

it includes a node entrypoint.js written in nodejs that supports the following ENV variables. on container execution. All none NodeJS Related Environment variables also get hornored and used on image build it self.

Pre-defined Environment Variables:

  • NODE_VERSION:
    • Example: 18 or 18.x (defaults to node20 or lts if not provided)
  • NODE_ENV:
    • Node's environment (development, production) (defaults to production if not specified)
  • NPM_VERSION:
    • Value that sets the npm version (defaults to 10.7.0 if not specified)
  • NPM_FLAGS:
    • Value passed when running npm install (accepts null if not specified)
  • NPM_TOKEN:
    • Used for fetching private npm modules (accepts null if not specified)
  • YARN_VERSION:
    • Yarn version (accepts 1.22.22 if not specified)
  • YARN_FLAGS:
    • Value passed when running yarn install (accepts null if not specified)
  • YARN_NPM_AUTH_TOKEN:
    • Used for fetching private npm modules with Yarn (accepts null if not specified)
  • BUN_FLAGS:
    • Passed as flags on the bun install command (accepts null if not specified)
  • RUBY_VERSION:
    • Used to set the Ruby version (defaults to latest Ruby version if not specified)
  • PHP_VERSION:
    • Value that sets the PHP version (defaults to php7 if not specified)
  • PNPM_FLAGS:
    • Passed as flags on the pnpm install command (accepts null if not specified)
  • PYTHON_VERSION:
    • Value that sets the Python version (accepts 3.10 if not specified)
  • GO_VERSION:
    • Value that sets the Go version (defaults to go1.19.3 if not specified)
  • PANDA_PREVIEW:
    • Used to enable/disable PullRequest pipeline (defaults to disable if not specified)
  • PANDA_CI:
    • true/false will enable/disable pipeline trigger (defaults to true if not specified)

Build run

docker build . --tag b:latest
docker run --rm -e GO_VERSION=1.4 -e NPM_VERSION=10 -e NODE_ENV=development -e NODE_VERSION=20 localhost/b:latest go version
docker run --rm -e GO_VERSION=1.19 -e NPM_VERSION=20 -e NODE_ENV=prod -e NODE_VERSION=20 localhost/b:latest

Advanced and debugging

run with a specific npm and node version

docker run -v $(PWD)/app:/app -w /app -e NODE_ENV=production docker-image npx....
# Or use BUILD_COMMAND ENV npx -p node@latest -p yarn@latest yarn
docker run -v $(PWD)/app:/app -w /app -e NODE_ENV=production -e "npx -p node@latest -p yarn@latest yarn" docker-image

custom-build's People

Contributors

lemanschik avatar ajaysourcedigital avatar frank-dspeed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.