Long story short - it is possible.
This worked for me on Windows 10 Home:
- First you need Docker running. Docker for Windows is not supported on Windows Home (because Home edition doesn’t include Hyper-V), so I installed VirtualBox and Docker Toolbox. If
docker run hello-worldworks, you’re all set, otherwise refer to the Docker documentation.
- Copy the URL from the installation instructions and download the file: https://circleci.com/docs/2.0/local-jobs/#installation
- The file is a Bash script, so you need a Bash interpreter. I’m using Git Bash, which gets installed when you install Git for Windows.
- Git Bash does some magic with paths, eg. it translates
C:\User\x. You need to supress this behavior when running the CircleCI script.
I defined an alias in my
alias circleci='MSYS_NO_PATHCONV=1 /c/Users/x/bin/circleci'
- Mount the drive with your project:
- Open VirtualBox, click on the “default” instance, click “settings”, “shared folder” and add
- After starting the
docker-machine, mount the shared folder to the host filesystem:
docker-machine ssh default "sudo mkdir -p //c && sudo mount -t vboxsf C_DRIVE //c"'
- The point of this step is to make the absolute path to the project the same in the context of Git Bash as well as in the context of the Docker host.
- If your build needs to create symlinks (eg.
npm install), you need to:
- Run the
docker-machine startas an administrator.
- Setup the VBox instance to support symlinks:
VBoxManage.exe setextradata default VBoxInternal2/SharedFoldersEnableSymlinksCreate/C_DRIVE 1
Hope this helps someone.