我正在使用docker compose,这是我的yaml文件
web:
dockerfile: Dockerfile-dev
build: .
command: gulp
volumes:
- .:/app
ports:
- '9001:9001'
这是我的docker文件
FROM node:0.12.7
RUN npm install -g bower gulp
ADD . /app
WORKDIR /app
RUN bower install --allow-root
然后我跑了
docker-compose -f docker-compose-dev.yml build
docker-compose -f docker-compose-dev.yml up
但我得到以下错误
Recreating web_web_1...
Attaching to web_web_1
web_1 | [07:39:08] Local gulp not found in /app
web_1 | [07:39:08] Try running: npm install gulp
web_web_1 exited with code 1
Gracefully stopping... (press Ctrl+C again to force)**strong text**
我已经尝试在WORKDIR / app之前和之后添加行RUN npm install gulp以在本地安装它但是我得到了相同的错误
救命
最佳答案
原文链接:https://www.f2er.com/docker/436214.html