As Windows-10 Home doesnt support Hyper-V, While running docker-compose in windows 10 Home, You cannot map the current directory in windows to the docker volume,
I did the following solution:
I did the following solution:
- Connect Kitematic VM using WinSCP
- IP Address : 192.168.99.100
- UserName: docker
- Password : tcuser
- Upload all files for the docker container to the VM
- Example /home/docker/nginx
- Map the Volume to the folder in docker-compose.yml [Where the docker-compose.yml is still in the Windows machine, while all the container file is uploaded to the Kitematic VM -192.168.99.100 ]
version: '3'
services:
proxy:
image: nginx:1.13 # this will use the latest version of 1.13.x
ports:
- '80:80' # expose 80 on host and sent to 80 in container
volumes:
- /home/docker/nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- From windows Command prompt run docker-compose up
The above steps helped to run docker-compose.
If you have any other thoughts please share in comments.
No comments:
Post a Comment