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.
NODE_VERSION:- Example: 18 or 18.x (defaults to
node20orltsif not provided)
- Example: 18 or 18.x (defaults to
NODE_ENV:- Node's environment (development, production) (defaults to
productionif not specified)
- Node's environment (development, production) (defaults to
NPM_VERSION:- Value that sets the npm version (defaults to
10.7.0if not specified)
- Value that sets the npm version (defaults to
NPM_FLAGS:- Value passed when running
npm install(acceptsnullif not specified)
- Value passed when running
NPM_TOKEN:- Used for fetching private npm modules (accepts
nullif not specified)
- Used for fetching private npm modules (accepts
YARN_VERSION:- Yarn version (accepts
1.22.22if not specified)
- Yarn version (accepts
YARN_FLAGS:- Value passed when running
yarn install(acceptsnullif not specified)
- Value passed when running
YARN_NPM_AUTH_TOKEN:- Used for fetching private npm modules with Yarn (accepts
nullif not specified)
- Used for fetching private npm modules with Yarn (accepts
BUN_FLAGS:- Passed as flags on the
bun installcommand (acceptsnullif not specified)
- Passed as flags on the
RUBY_VERSION:- Used to set the Ruby version (defaults to
latestRuby version if not specified)
- Used to set the Ruby version (defaults to
PHP_VERSION:- Value that sets the PHP version (defaults to
php7if not specified)
- Value that sets the PHP version (defaults to
PNPM_FLAGS:- Passed as flags on the
pnpm installcommand (acceptsnullif not specified)
- Passed as flags on the
PYTHON_VERSION:- Value that sets the Python version (accepts
3.10if not specified)
- Value that sets the Python version (accepts
GO_VERSION:- Value that sets the Go version (defaults to
go1.19.3if not specified)
- Value that sets the Go version (defaults to
PANDA_PREVIEW:- Used to enable/disable PullRequest pipeline (defaults to
disableif not specified)
- Used to enable/disable PullRequest pipeline (defaults to
PANDA_CI:true/falsewill enable/disable pipeline trigger (defaults totrueif not specified)
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
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