Setting up with Docker
To get started, install Docker. On Ubuntu for instance (you’ll need set up the repository; see install-docker-ce for details):
Make sure your user is added to the unix group docker
:
Download the Contiki-NG image:
This will automatically download contiker/contiki-ng:latest
, which is the image used in CI and which we recommend for development. If you wish to use a different image version please follow the guidelines in the start of the article. The image is meant for use with Contiki-NG as a bind mount, which means you make the Contiki-NG repository on the host accessible from inside the container. This way, you can work on the codebase using host tools / editors, and build/run commands on the same codebase from the container. If you do not have it already, you need to check out Contiki-NG:
Then, it is a good idea to create an alias that will help start docker with all required options. On Linux, you can add the following to ~/.profile
or similar, for instance, to ~/.bashrc
:
You will be under /home/user/contiki-ng
in the container, which is mapped to your local copy of Contiki-NG.
Additional shell for existing container
Typing contiker
as above will launch a new container. Sometimes it is useful to have multiple terminal sessions within a single container, e.g., to run a tunslip6 on one terminal and other commands on another one. To achieve this, start by running:
This will present you with a list of container IDs. Select the ID of the container you wish to open a terminal for and then
Last updated