The topic already existed, but a year ago and I do not know if there was a solution.
System:
- Windows 10 - 10.0.19025.1
- WSL -Unix: Ubuntu 18.04
- WSL - 2 activated
- Docker Desktop 2.1.6.0
- Docker - Deamon on WSL 2
Case:
I cloned a docker-compose repository into my windows wsl 2 environment. I did not manage to succesfully build.
I have 2 ymls in use:
-
docker-compose.yml
... api: command: [ "/opt/startup.sh" ] expose: - "3000" volumes: - logs:/var/log/deltaquest - versions:/var/versions links: - db - redis redis: image: redis:3.2 db: image: mongo:4.0 volumes: - mongodb:/data/db ...
-
docker-compose.override.yml
... api: build: context: . dockerfile: /api/Dockerfile environment: - NODE_ENV=development - NODE_STAGE=development ports: - "3000:3000" - "9229:9229" volumes: - ./api/src:/app/src - ./api/test:/app/test - ./shared/src:/shared/src - ./import/dp:/import/dp …
When I try the following command (out of WLS 2):
docker-compose --verbose build api
the build crashes:
File "site-packages\docker\api\build.py", line 148, in build
TypeError: You must specify a directory to build in path
[14012] Failed to execute script docker-compose
In the stack (unfortunately I cannot upload a file yet), there is mentionned:
compose.cli.verbose_proxy.proxy_callable: docker build <- (path='\\\\?\\\\\\wsl$\\Ubuntu\\home\\donald\\deltaquest', tag='dq_api', rm=True, forcerm=False, pull=False, nocache=False, dockerfile='/api/Dockerfile', cache_from=None, labels=None, buildargs={}, network_mode=None, target=None, shmsize=None, extra_hosts=None, container_limits={'memory': None}, gzip=False, isolation=None, platform=None)
and I what I see there: path=’\\?\\\wsl$\Ubuntu\home\donald\deltaquest …seems weird to me.
I didn’t achieve to change anything in the build process by
- changing methods of context and or dockerfile
- same issue I had before upgrading to WSL2 (I wrongly thought that maybe a solution)
Does anyone have any ideas, I’m trying already since a day, no success.
andi