Skip to content

amitie10g/node-nanoserver-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node.js on Windows Nano Server

Docker Image CI

Node.js logo

This project brings Node.js (version 4 to 22) on Microsoft Windows Nano Server ltsc2022 and ltsc2019 (and optionally PowerShell 7.3 on Nano Server ltsc2022) base image.

Tags

  • <node version> Windows Nano Server ltsc2022 base image
  • <node version>-pwsh Windows Nano Server ltsc2022 plus PowerShell 7.3 base image

Full list of tags avilable at both GitHub Container registry and Docker Hub Container registry.

Usage

This project is intended to be used as base image for other Node-based projects. An example Dockerfile:

FROM amitie10g/node-nanoserver:iron

COPY . C:\\Users\\ContainerUser\\app
RUN npm install --omit=dev

ENTRYPOINT ["npm", "start"]

If you need to install system-wide software, you need to set USER as ContainerAdministrator. Afterward, you need to change it back to ContinerUser.

If you want to use it within GitHub Actions, prefer the GitHub Container registry: ghcr.io/amitie10g/node-nanoserver

Building

Containers for this project has been built using GitHub Actions for automated weekly builds from 4 to 22 under Windows Nano Server ltsc2022 and ltsc2019. GitHub provides runners only for Windows Server 2022 (ltsc2022) and Server 2019 (ltsc2019) and no hyperv isolation is supported. If you need other versions of Windows, follow this instructions.

docker build -t <tag> --build-arg NODE_VER=<node version> --build-arg BASE_IMG=<base image> --build-arg CONT_VER=<container version> .

Where,

  • NODE_VER is used to download Node from https://nodejs.org/dist/v${NODE_VER}/node-v${NODE_VER}-win-x64.zip
  • BASE_IMG is the base image, either windows/nanoserver or powershell
  • CONT_VER is the tag available for each base image. For a full list of available tags, consult the respective page of the base images provided (links above).

Licensing

  • Everything in this repo is released into the Public domain (the Unlicense)
  • Node.js is licensed under the MIT License.
  • Microsoft Windows container images usage is subjected to the Microsoft EULA
  • Microsoft PowerShell is licensed under the MIT License.