How to update nodejs on a docker container ? Linux Debian

Viewed 27
1 Answers

You cannot just add another FROM line (except multi-stage builds). Each image can only have one base image that is defined using FROM.

There are different possible approaches to combine components from two images:

  1. You update the base image (if you are the author of the base image, i.e. moiamond/docker-ffmpeg-base-debian) to your needs
  2. You run the necessary commands in your Dockerfile to install/update the nodejs version you want to have (might be tricky if the image is very old and there is no up-to-date node version available as package).
  3. You use a different base image, e.g. an image that contains the node version you want to use and install ffmpeg and other components that are contained in moiamond/docker-ffmpeg-base-debian via your Dockerfile.
Related