Tôi đang sử dụng Docker soạn và đây là tập tin yaml tôiLàm thế nào để cài đặt ngụm trên Docker với Docker-soạn
web:
dockerfile: Dockerfile-dev
build: .
command: gulp
volumes:
- .:/app
ports:
- '9001:9001'
và đây là tập tin Docker tôi
FROM node:0.12.7
RUN npm install -g bower gulp
ADD . /app
WORKDIR /app
RUN bower install --allow-root
Sau đó, tôi chạy
docker-compose -f docker-compose-dev.yml build
docker-compose -f docker-compose-dev.yml up
Nhưng tôi gặp lỗi sau
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**
Tôi đã thử thêm dòng RUN npm install gulp
trước và sau khi WORKDIR /app
để có được nó được cài đặt tại địa phương nhưng tôi nhận được các lỗi tương tự
Trợ giúp
Tôi không biết gì về ngụm, nhưng Dockerfile bạn nên kết thúc với một 'CMD' hoặc' EntryPoint 'Tôi nghĩ rằng, hãy xem https://docs.docker.com/reference/builder/#cmd và https://docs.docker.com/reference/builder/#entrypoint – user2915097