Skip to content

Pure njs(Nginx JavaScript) Docker image, more convenient for development and debugging.

License

Notifications You must be signed in to change notification settings

soulteary/docker-njs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Nginx JavaScript

Pure njs(Nginx JavaScript) Docker image, more convenient for development and debugging.

Quick reference

Supported tags and respective Dockerfile links

NJS 0.7.0 (Nginx 1.21.4+)

NJS 0.6.2 (Nginx 1.21.3+)

NJS 0.6.1 (Nginx 1.21.1+)

NJS 0.5.3 (Nginx 1.19.9 ~ 1.21.0+)

NJS 0.5.2 (Nginx 1.19.8)

NJS 0.5.1 (Nginx 1.19.7)

NJS 0.5.0 (Nginx 1.19.6)

NJS 0.4.4 (Nginx 1.17.10 ~ 1.19.5)

NJS 0.3.9 (Nginx 1.17.10-)

What is nginx/njs ?

Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage. It is licensed under the 2-clause BSD-like license and it runs on Linux, BSD variants, Mac OS X, Solaris, AIX, HP-UX, as well as on other *nix flavors. It also has a proof of concept port for Microsoft Windows.

wikipedia.org/wiki/Nginx

logo

njs is a subset of the JavaScript language that allows extending nginx functionality. njs is created in compliance with ECMAScript 5.1 (strict mode) with some ECMAScript 6 and later extensions. The compliance is still evolving.

nginx.org/en/docs/njs/

How to use this image

You can use it as repl server or executor.

Repl Server

Just run the most common docker command:

$ docker run -it --rm njs:0.5.0

Run a single njs script

You can run a njs script by using the njs Docker image directly:

$ docker run -it --rm --name my-running-script -v "$PWD":/app njs:0.5.0 /app/your-script.js

Image Variants

The njs images come in many flavors, each designed for a specific use case.

njs:<version> / njs:<version>-alpine

Strip njs from the nginx offical docker alpine image and re-use alpine system for packaging and building.

This image is based on the popular Alpine Linux project, available in the alpine official image. Alpine Linux is much smaller than most distribution base images (~5MB), and thus leads to much slimmer images in general.

njs:<version>-alpine-slim / njs:<version>-slim

Compressed alpine image.

About

Pure njs(Nginx JavaScript) Docker image, more convenient for development and debugging.

Topics

Resources

License

Stars

Watchers

Forks