I am running Docker for Windows WSL. I have the following docker compose file:
version: '3'
services:
db:
image: "postgres:9.6-alpine"
container_name: db
volumes:
- data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
- POSTGRES_DB=read_bytes
- POSTGRES_USER=readbytes_admin
- POSTGRES_PASSWORD=mypass
proxy:
build: ./proxy
container_name: proxy
ports:
- 80:80
depends_on:
- api
volumes:
- ./proxy/default.conf:/etc/nginx/conf.d/default.conf
links:
- api
api:
build: ./api
container_name: api
environment:
- DB_SERVER=db
- POSTGRES_DB=read_bytes
- POSTGRES_USER=readbytes_admin
- POSTGRES_PASSWORD=mypass
- OAUTH_CLIENT_ID=YOUR_GOOGLE_OAUTH_CLIENT_ID
ports:
- 8081:8080
links:
- db
depends_on:
- db
command: sh -c "mvn clean flyway:migrate -Dflyway.configFiles=flywayConfig.properties && java -jar api.jar"
volumes:
data:
and i get the error:
ERROR: for proxy Cannot start service proxy: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/run/desktop/mnt/host/d/Data_SD/aaa/bbb/ccc/DataEncrypt API Traffic/fff/ggg/proxy/default.conf" to rootfs at "/etc/nginx/conf.d/default.conf" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
I am running docker-compose from D: drive within the SD-card. I read similar issues but did not help.
any hint?
ENVIRONMENT
was exactly what I've forgotten. After setting those vars, the error was fixed. – Pathros