So I have a rails app that uses docker. It has A Dockerfile and a docker-compose.yml file. I'm trying to upgrade the node version from 12.x to 16.x . I changed the nodesource set up the dockerfile was using from 12.x to 16.x (RUN curl -sL https://deb.nodesource.com/setup_16.x | bash -
). I then ran my docker compose up to run all my containers and opened a shell in one of the containers to check what version of node it was using. It's still using a node version 12.22.12. Have I missed something?
CodePudding user response:
You need to rebuild your image(s) with
docker-compose up --build
or just specific service
docker-compose up --build rails
Of course you can add other options as well, for example
docker-compose up --build -d rails