/docker-images-nodejs

Container images based on NodeJS

Primary LanguageShell

Docker images to support NodeJS-based software engineering

Docker Cloud Build Status

Introduction

That project produces Docker images, hosted on dedicated public Docker Cloud site. Those Docker images are intended to bring Linux-based ready-to-use environment for software engineering based on NodeJS utilities.

The only supported Linux distribution, so far is Ubuntu 20.04 LTS (Focal Fossal), as it is one of the most commons, and is for instance used as a base to Postman Newman.

Every time some changes are committed on the project's GitHub repository, the Docker images are automatically rebuilt and pushed onto Docker Hub/Cloud.

When some more components are needed, which may be of interest to other software engineers, the Docker image may be amended so as to add those extra components. The preferred way to propose amendment of the Docker image is through pull requests on the GitHubproject. Once the pull request has been merged, i.e., once the Dockerfile amendment has been committed in GitHub, Docker Hub/Cloud then rebuilds the corresponding container images, which become available for every one to use.

Images on Docker Hub/Cloud

Using the pre-built development images

  • Start the container featuring the NodeJS-based image:
$ docker pull infrahelpers/node
$ docker run --rm -v ~/tmp/collections:/tmp/collections -it infrahelpers/node bash
[build@5..0 dev]$ 
  • Launch Newman on some collection:
[build@5..0 dev]$ newman run /tmp/collections/some-collection.json --reporters cli,csv,json --reporter-csv-export newman/some-report.csv --reporter-json-export newman/some-report.json

Customize a container image

The images may be customized, and pushed to Docker Hub/Cloud:

$ mkdir -p ~/dev/infra
$ cd ~/dev/showcase
$ git clone https://github.com/infra-helpers/docker-images-nodejs.git docker-images-nodejs
$ cd docker-images-nodejs
$ vi ubuntu2004/Dockerfile
$ docker build -t infrahelpers/node ubuntu2004/
$ docker run --rm -v ~/tmp/collections:/tmp/collections -it infrahelpers/node bash
[build@9..d]$ exit
$ docker push infrahelpers/node

TODO

For any of the following features, an issue may be open on GitHub:

  1. Automate regular rebuilds (e.g., once a month for new releases of NodeJS)