Tuesday, April 9, 2019

How to run docker-compose in windows 10 Home - kitematic

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:

  1. Connect Kitematic VM using WinSCP
    1. IP Address : 192.168.99.100
    2. UserName: docker
    3. Password : tcuser
  2. Upload all files for the docker container to the VM
    1. Example /home/docker/nginx
  3. 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
  1. 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: