lqqyt2423/wechat_spider

mac 运行 MONGO_PATH=/data/mongo docker-compose up报错·

Closed this issue · 1 comments

Pulling mongo (mongo:3.6)...
3.6: Pulling from library/mongo
0a01a72a686c: Pull complete
cc899a5544da: Pull complete
19197c550755: Pull complete
716d454e56b6: Pull complete
0793d4ab2500: Pull complete
df33e33466d0: Pull complete
3b2d76901480: Pull complete
df04584b8696: Pull complete
80dc6d311601: Pull complete
000637459d95: Pull complete
8e5d88b7543b: Pull complete
ee7d07a859de: Pull complete
570420d1587b: Pull complete
Digest: sha256:1e267a2a16093e70a9b21a75a912ab8898971f42ce00f2d9ae2660410604d65e
Status: Downloaded newer image for mongo:3.6
Building app
Step 1/9 : FROM node:10.16.3
10.16.3: Pulling from library/node
9a0b0ce99936: Pull complete
db3b6004c61a: Pull complete
f8f075920295: Pull complete
6ef14aff1139: Pull complete
0bbd8b48260f: Pull complete
524be717efb1: Pull complete
aad1e8812bc2: Pull complete
13fb072986db: Pull complete
627a2df19018: Pull complete
Digest: sha256:f4b6f471cdd4b66b27eef899e7f8423ecd9fbfc863b2cb7a59978a7f64c8e0c3
Status: Downloaded newer image for node:10.16.3
---> a68faf70e589
Step 2/9 : WORKDIR /app
---> Running in 5ece924b7018
Removing intermediate container 5ece924b7018
---> 9a306797bade
Step 3/9 : COPY package.json package-lock.json /app/
---> e6063c8ed833
Step 4/9 : RUN npm install
---> Running in e1060dbd7737

core-js@2.6.11 postinstall /app/node_modules/core-js
node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:

https://opencollective.com/core-js
https://www.patreon.com/zloirock

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

nodemon@1.19.4 postinstall /app/node_modules/nodemon
node bin/postinstall || exit 0

Love nodemon? You can now support the project via the open collective:

https://opencollective.com/nodemon/donate

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 622 packages from 887 contributors and audited 3452 packages in 15.33s
found 2 low severity vulnerabilities
run npm audit fix to fix them, or npm audit for details
Removing intermediate container e1060dbd7737
---> 9a64e058a150
Step 5/9 : COPY . /app
---> 8988fefddd11
Step 6/9 : RUN cd ~ && mkdir .anyproxy && cd .anyproxy && mv /app/certificates ~/.anyproxy/ && cp ~/.anyproxy/certificates/rootCA.crt /usr/local/share/ca-certificates/ && update-ca-certificates
---> Running in c9b1fde36b4f
Updating certificates in /etc/ssl/certs...
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Removing intermediate container c9b1fde36b4f
---> 28bd2fa539f6
Step 7/9 : RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
---> Running in 3922657deab8
Removing intermediate container 3922657deab8
---> c0d38fb8595f
Step 8/9 : EXPOSE 8101 8104
---> Running in 1526d210c2e2
Removing intermediate container 1526d210c2e2
---> ede80d43221a
Step 9/9 : CMD ["node", "index.js"]
---> Running in 73411a22b508
Removing intermediate container 73411a22b508
---> 30697f95b868
Successfully built 30697f95b868
Successfully tagged wechat-spider:latest
WARNING: Image for service app was built because it did not already exist. To rebuild this image you must use docker-compose build or docker-compose up --build.
wechat_spider_redis_1 is up-to-date
Creating wechat_spider_mongo_1 ... error

ERROR: for wechat_spider_mongo_1 Cannot start service mongo: Mounts denied:
The path /data/mongo
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.

ERROR: for mongo Cannot start service mongo: Mounts denied:
The path /data/mongo
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
ERROR: Encountered errors while bringing up the project.

ERROR: for wechat_spider_mongo_1 Cannot start service mongo: Mounts denied:
The path /data/mongo
is not shared from OS X and is not known to Docker.

错误信息不是有吗,你地址填个本机合法的地址,我文档中只是为了演示