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