Recently, we worked with the Node.js community docker team to enable the additional architecture support for Node.js docker images. Several platforms are now supported, including two IBM platforms: Linuxâ„˘ on IBMÂ® PowerÂ® systems and Linuxâ„˘ on z Systemsâ„˘. From now on, when the Node.js community submits a pull request for a new version of a Node.js docker image and the pull request lands, the images for these two platforms are automatically built and published alongside the others. Here are the pull requests: Support Linux on ppc64le and Support s390x architecture.
Although you could already get the binaries forÂ Linuxâ„˘ on IBMÂ® PowerÂ® systems and Linuxâ„˘ onÂ z Systemsâ„˘ on the Node.js download site, the automation should make using docker with these platforms easier.
Pulling the docker images
To pull and run the Node.js docker image on IBMÂ® PowerÂ® systems, use the following command:
docker run -ti ppc64le/node:8
This starts a node interactive shell and you can check the version by running the following command:
If you want to use the Node.js docker image for Linuxâ„˘ on z Systemsâ„˘, you need to change the architecture label from ppc64le to s390x. For example:
docker run -ti s390x/node:8
There are 4 image variants to choose from:
- default: This image is built on top of buildpack-deps:jessie.
- slim: This image is still the Debian Jessie release but the image size is smaller.
- stretch: This image is built on top of buildpack-deps:stretch.
- onbuild: This variant is used to build your custom docker image in the experimental phase. Once you finish your development, you should change to one of the other three variants.
The images for the Linuxâ„˘ on IBMÂ® PowerÂ® systems are published in the ppc64le directory:
And the images for the Linuxâ„˘ on z Systemsâ„˘ are published in the s390x directory:
Note: The Node.js version of docker images for these architectures are the same, except version 4.8 is not supported on z Systemsâ„˘.
Let’s assume that you want to build a docker image for your website project, which is in a git repository.
Here is a simple Dockerfile for Linuxâ„˘ on IBMÂ® PowerÂ® systems, which uses the ppc64le/node:8.4.0 base image, clones a project from a git repository, uses yarn to install the dependencies, and runs the
'npm start' command to start the application.