【发布时间】:2017-10-31 16:53:34
【问题描述】:
我在运行 docket 容器时遇到问题,出现错误:
error: uncaughtException: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.
这是完整的堆栈跟踪:http://pastebin.com/qV0hzRxL
这是我的 Dockerfile:
FROM node:6.7-slim
# ----- I added this, but it didn't help
RUN apt-get update && apt-get install -y gcc g++
RUN gcc --version
RUN g++ --version
# ------------------------------------
WORKDIR /usr/src/app
ENV NODE_ENV docker
RUN npm install
CMD ["npm", "start"]
- 然后我成功构建它:
sudo docker-compose build --no-cache chat-ws(chat-ws是图像名称) -
sudo docker-compose up chat-ws以错误结尾。
注意:Docker 镜像是 docker-compose 中组合的一部分。
编辑: 部分
docker-compose.yml
chat-ws:
build: ./dockerfiles/chat-ws
links:
- redis
- chat-api
ports:
- 3000:3000
volumes_from:
- data_chat-ws
和:
data_chat-ws:
image: node:6.7-slim
volumes:
- ${PATH_CHAT_WS}:/usr/src/app
command: "true"
有什么想法吗?请? 谢谢,彼得
【问题讨论】:
标签: c++11 docker npm docker-compose