【发布时间】:2018-02-15 14:58:59
【问题描述】:
我是 docker 新手,在命令行中运行此脚本后遇到错误:
docker-compose up postgres-95 mysql-57
为了给你更多的背景信息,我正在努力为 Sequelize 做出贡献,我正在按照 https://github.com/sequelize/sequelize/blob/master/CONTRIBUTING.md#coding-guidelines 的指示进行操作
ERROR: for mysql-57 Cannot start service mysql-57: Mounts denied:
The path /mnt/sequelize-mysql-ramdisk
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.
Starting postgres-95 ... error
ERROR: for postgres-95 Cannot start service postgres-95: Mounts denied:
The path /mnt/sequelize-postgres-ramdisk
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.
任何帮助将不胜感激!
编辑: 不知道这是否有帮助,但这里是 docker-compose.yml:
# PostgreSQL
postgres-95:
image: sushantdhiman/postgres:9.5
environment:
POSTGRES_USER: sequelize_test
POSTGRES_PASSWORD: sequelize_test
POSTGRES_DB: sequelize_test
volumes:
- /mnt/sequelize-postgres-ramdisk:/var/lib/postgresql/data
ports:
- "8998:5432"
container_name: postgres-95
# MySQL
mysql-57:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: lollerskates
MYSQL_DATABASE: sequelize_test
MYSQL_USER: sequelize_test
MYSQL_PASSWORD: sequelize_test
volumes:
- /mnt/sequelize-mysql-ramdisk:/var/lib/mysql
ports:
- "8999:3306"
container_name: mysql-57
【问题讨论】:
-
您的 Mac 上是否存在
/mnt/? -
@Deancoakley 我不确定,但我不相信。另外,请在我的问题中添加 docker-compose.yml。
标签: mysql postgresql docker sequelize.js