When I was developing Rails with Docker, the following error suddenly occurred and I could not open the application.
First, if you look at the error statement, it says "Autoprefixer doesn't support Node v4.8.2. Update it.", And when translated, "Autoprefixer does not support Node v4.8.2. Please update." . ".
When I check the version of Node.js by executing the following command, it seems to be v4.8.2 as the error statement.
docker-compose run app nodejs -v
v4.8.2
Upon investigation, I found that Bootstrap was the cause. In the Bootstrap source code, the vendor prefix is not intentionally described and everything is left to a module called Autoprefixer, and this module does not accept Node.js version v.4.8.2.
Once you know the cause, just deal with it! Changing the version of Node.js in the container should solve it ...
The OS that makes up the Rails container is debian Linux, and you can add the repository (software acquisition source) used by the apt-get command of the debian package management command "apt". Add the version 10 Node.js repository before the Node.js apt-get described in the Dockerfile.
Dockerfile
+ RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get update -qq && \
apt-get install - y build-essential \
libpq-dev \
nodejs
Now version 10 Node.js is installed. If the container is running, stop it, rebuild it without using the cache, and then start it.
docker-compose stop
docker-compose build --no-cache
docker-compose up -d
The application screen was displayed normally with the above support.
I'm happy.