The RUN command can be run in the environment variable in the FROM mirror when docker build

  docker, question


  • I created a container using ubuntu14.04 image
  • I installed my running environment and many libraries in the container. Such as nvm node and other compilation libraries
  • I have a mirror image of the container commit that I installed in the tool library.
  • I created a dockerfile FROM fill-in that is a mirror image of the commit I just made.

Question: when running RUN node -v, prompt /bin/sh: 1: node: not found
My mirror image is already installed, how to make the RUN command in dockerfile run in the environment variable of my commit mirror image during build?

The absolute path must be written after RUN.
Such as

RUN /usr/bin/node -v