I need run npm rebuild node-sass --force inside my docker container
But i got an error (even after i install python already)
Error: Can't find Python executable "python", you can set the PYTHON env variable.
This is my Dockerfile
FROM node:8.16.0-alpine
RUN mkdir /app
WORKDIR /app
# --no-cache: download package index on-the-fly, no need to cleanup afterwards
# --virtual: bundle packages, remove whole bundle at once, when done
RUN apk --no-cache --virtual build-dependencies add \
python \
make \
g++ \
bash \
&& npm install \
&& apk del build-dependencies
RUN npm install -g nodemon
COPY package.json package.json
COPY client/package.json client/package.json
RUN npm install
RUN npm run install:client
RUN npm uninstall node-sass && npm install node-sass
RUN npm rebuild node-sass --force
COPY . .
LABEL maintainer="Varis Darasirikul"
VOLUME ["/app/public"]
CMD npm run dev
This my docker-compose
version: '3'
services:
web:
build: '.'
container_name: node-web
# env_file:
# - '.env'
ports:
- '80:8000'
- '5000:5000'
- '3000:3000'
volumes:
- '.:/app'
networks:
- front-tier
- back-tier
# depends_on:
# - redis
# - db
networks:
front-tier:
back-tier:
Even when i run
docker-compose up --build --force-recreate
Still not working
How to fix this?
Thanks!