Skip to content
Todor Minchev edited this page Mar 3, 2016 · 15 revisions

1* . Install Docker

  • Windows users must use the Docker Toolbox for CROPS installer.
    **DO NOT USE THE STANDARD DOCKER TOOLBOX INSTALLER OR YOU WILL BE BITTEN BY THE NDIS5 BUG! **.Bug details can be found here

    These are the choices you need to have selected when you do the DockerToolbox Installation. If you do not have an NDIS5 checkbox, it means that you are running the wrong installer!.

  • Mac users can download the standard Docker Toolbox installer package for Mac OS X.

2* . Run Zephyr Installer

Now you need to run the Zephyr installer from the Docker Quickstart Terminal. From within the Docker Quickstart Terminal do:

$>source <(curl -s https://raw.githubusercontent.com/todorez/crops/master/installers/zephyr-installer.sh)

If you already have the correct images, you can answer "No" to the download questions. If you are unsure, answer "Yes" to all installer questions. This will set up your docker in a known CROPS compliant configuration. The containers should look like, though the ids will be different:

$>docker ps -a



3* . Build Zephyr applications using the CLI or Eclipse

Troubleshooting

  • If you have issues starting up docker and it looks like this: <br<

Then it means that the VirtualBox VM can't even start up. Goto the Oracle VM VirtualBox Manager and look at the logs. You reach the logs by right clicking on the default virtual machine and picking logs.

* If the Vbox logs say something like:
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND). ```

It strongly implies that you did <strong>NOT</strong> install the NDIS5 Driver using the CROPS specific [Docker Toolbox for CROPS](https://dl.dropboxusercontent.com/u/19449889/DockerToolbox-CROPS.exe) installer
* If there is no "default" machine in the Oracle VM VirtualBox Manager then it means that the Docker Quickstart Terminal's initial run failed to create one. Here are some handy tools to help understand what is happening:
 * To see what virtual machines are available:
<br>
``` $> docker-machine ls ```
<br>
``` NAME      ACTIVE   DRIVER       STATE     URL   SWARM   ERRORS ```
<br>
``` default   -        virtualbox   Stopped                 ```
 * To start up a virtual machine so that it can be used with docker
<br>
``` $> docker-machine start default 
(default) Starting VM...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command. ```

* To enable the docker (as opposed to the docker-machine) commands to work, you need to set some environment variables that tell the docker commands how to contact the VM you are running the docker-engine on.  This is accomplished via:
``` $> docker-machine env default ```
<br>
``` export DOCKER_TLS_VERIFY="1" ```
<br>
``` export DOCKER_HOST="tcp://192.168.99.100:2376" ```
<br>
``` export DOCKER_CERT_PATH="/Users/username/.docker/machine/machines/default" ```
<br>
``` export DOCKER_MACHINE_NAME="default" ```
<br<
``` # Run this command to configure your shell: ```
<br>
``` # eval "$(docker-machine env default)" ```
<br>
The last line (in this case on a mac so I get ``` # eval "$(docker-machine env default)" ``` tells you what to run in the terminal you are using to enable the needed env variables. It even handles command.com terminals!
 * If you need to recreate your virtual machine or the virtual machine creation in the Docker Quickstart Terminal has failed you can do:
<br>
``` docker-machine create -d virtualbox default ```
<br>
and then you probably also need to do:
<br>
``` docker-machine regenerate-certs default ```
<br>
and then you will need to redo the ``` docker-machine env default ``` referenced above. This is a good way to see what the errors are if the virtual machine creation is causing you problems.  Also, there are alot of advanced options for the vm creation.
~