我正在此docker-compose up
文件上运行命令docker-compose.yml
我的机器正在运行Windows 10 Home Edition 2004,该版本支持在WSL 2后端上运行docker容器。
version: '3.1'
services:
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- ./docker-data/db-data:/var/lib/postgresql/data
ports:
- 5432:5432
adminer:
depends_on:
- db
image: adminer
restart: always
ports:
- 8080:8080
但我收到此错误:
Creating network "backend_default" with the default driver
Creating backend_db_1 ... done
Creating backend_adminer_1 ... done
Attaching to backend_db_1, backend_adminer_1
adminer_1 | [Mon Apr 6 16:23:05 2020] PHP 7.4.4 Development Server (http://[::]:8080) started
db_1 | chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
backend_db_1 exited with code 1
db_1 | chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
backend_db_1 exited with code 1
db_1 | chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
backend_db_1 exited with code 1
db_1 | chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
backend_db_1 exited with code 1
db_1 | chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
backend_db_1 exited with code 1
db_1 | chmod: /var/lib/postgresql/data/pgdata: Operation not permitted
backend_db_1 exited with code 1
我不知道为什么会这样!
请帮助我。
答案 0 :(得分:0)
我发现这是Windows上的错误。所以没办法。尽管遵循GitHub来解决问题!