Sign inSign up

jhtna/node-build

By jhtna

•Updated 5 days ago

Build image for node projects

Image
0

100K+

jhtna/node-build repository overview

⁠Node build environment for BitBucket Pipelines

Build environment based on the official node Docker images.

Includes:

  • node
  • build essentials (make, gcc, etc)
  • docker
  • aws cli

$HOME is set to /root/.

⁠Usage

⁠Docker builds

To use the docker commands with a Docker build server, you will need the appropriate environment variables:

  • AWS_ACCESS_KEY_ID - Used to get Docker build server certificates, ECR login
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION
  • S3_DOCKER_CERT_LOCATION - s3:// Location to copy *.pem certs from
  • DOCKER_HOST - tcp:// Host to connect to
  • DOCKER_TLS_VERIFY - Should always be 1
  • DOCKERHUB_USERNAME - Docker Hub username to use to login
  • DOCKERHUB_PASSWORD - Docker Hub password to use with said username

Then your build script must call: $HOME/setup-docker.bash to login to ECR/Dockerhub and copy docker server client certificates.

⁠Node builds

To use private npm repositories you must set the NPM_TOKEN environment variable.

To use bitbucket hosted npm modules you must set the S3_SSH_KEY_LOCATION environment variable for the private key you wish to use for bitbucket ssh access. Then your build script must call: $HOME/setup-ssh.bash to configure ssh key and known_hosts.

⁠Selenium test builds

To use webdriver against firefox or chromium, you will need to run $HOME/start-xvfb.bash before your tests. This script respects XVFB_SCREEN_DIMENSIONS to set the screen dimensions to your liking. The default dimensions are 1280x1024x16. The default DISPLAY is :1.0.

⁠Recommendations

Set NPM_CONFIG_LOGLEVEL=warn on run to prevent unnecessary npm output. Set bower_quiet=true on run to prevent unnecessary bower output.

Tag summary

Content type

Image

Digest

sha256:c56b02f6a…

Size

855.2 MB

Last updated

5 days ago

docker pull jhtna/node-build:24