I have some issues with Docker. I have all legato containers but I don’t know how to call my Makefile with theses docker containers to compile for WP85 on my macintosh.
Do you have any examples? I don’t really know how to use docker run stuff, thank you very much.
Run docker --help to make sure that you have docker installed properly and that it’s in your $PATH.
Run docker images to view the list of images that docker knows about
Run docker run -it -v $LEGATO_ROOT:/legato <image_repository>:<image_tag> bash
The final command above will mount the directory contained in $LEGATO_ROOT into the docker environment at /legato and then will run bash. You can then do cd /legato followed by make wp85 to build. The image_repository and image_tag values can be obtained from the docker images command before. I’m not actually using the docker toolchain myself, so I don’t know what the exact names are.
How did you get the Docker images on your Mac?
The usual way is to use Developer Studio package manager. Then you can use Developer Studio to build you projects on Mac.
If you want to do it from the command line only, this is doable as well.
Please just tell where you want to go, and we’ll give you the instructions
I get all docker images from legato hub: Docker Hub
I download some images like toolchain, ds-runtime and framework.
I would like to have cross-compilation from my macintosh command line, I tested the developer studio, it’s a nice Eclipse integration, well done! I will take a look but from now I have to write an application for a meeting and I’m better with my macintosh and vim habits
If you have instructions about this kind of configuration to build for example a local hello world it will be very usefull, thank you very much.
Actually, toolchain, ds-runtime and framework images are sort of deprecated.
This was the way we were manage images about one year ago (Legato 16.01.* versions).
The issue was that for pure command-line use case, it was too complicated to setup all the containers to make them working together.
We’re now working with sdk images, that are baselining all the necessary stuff in one image.
What you have to do is:
This will download the lastest SDK version for WP85.
Then:
docker run --rm -it -v $MYPATH:/shared -w /shared legato/sdk:16.10.1-wp85-wp750x-201701091127 /bin/bash
This will start a bash shell inside the Legato SDK container. You will have everything set to play with Legato tools (mkapp, etc…) $MYPATH needs to be a path on your host, that will be shared with the container.
I guess you mean building the Legato framework?
First of all, please note that if you only intend to develop apps, the Docker image already includes all the necessary pre-built stuff for this use case, so you don’t need to build the framework again.
If you want to go further and rebuild the Framework (and/or even maybe the Yocto distribution), you’ll probably need to switch to a Linux host for a better user experience.
The Docker legato/sdk image is not including all the necessary dependencies required to build the framework from the source code.
@daav and @jlouis I am trying to get something running on my WP7702 (firmware SWI9X06Y_02.14.04.00) board on my Mac (High Sierra 10.13.6). I would like to use docker+vim for the basic things I intend to do.
I notice that the latest post was 2 years ago, and that the docker hub for legato now contains several images. Is still legato/sdk the right one? Would it work with my board?
those Docker images are sort of deprecated, but I have a better solution for you.
We have delivered a new command line workspace manager, which is definitely compatible with Docker. Details here: Leaf Workspace Manager - Legato Docs
You just need to grab the distribution image of your choice (e.g. ubuntu:latest) and follow the instructions to install leaf, then use leaf to install the SDK.
Can confirm that the new Leaf tool is compatible with Docker and works like a charm! I can now easily compile anywhere.
This truly is the missing piece for Legato and will make a huge difference to the development process.
@daav Do you plan to make the Leaf source code available on Github? I dream of a Particle style cloud compile tool for Legato and this will make it a whole heap easier.
@tomlewis0 I’m new to Legato development as I’ve have just joined a company using Sierra modules. Are you able to provide a brief overview of how you use docker? I’d prefer this to using a Linux VM.