jakhax / mbed-tools-docker

a docker image for new mbed tools with cmake and ninja build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mbed Tools Docker

This is an un-official mbed-tools docker image.

Currently it only supports GCC Arm as its default compiler.

For old mbed-cli docker image see https://github.com/jakhax/docker-mbed-cli

Building

docker build -t "mbed_tools" --build-arg USER_ID=$(id -u)  --build-arg GROUP_ID=$(id -g) .

if you dont plan on using it with your default user(shared user permissions) you can edit this part out in the Dockerfile

#shared user permissions
ARG USER_ID
ARG GROUP_ID
RUN addgroup --gid $GROUP_ID user
RUN adduser --disabled-password --gecos '' --uid $USER_ID --gid $GROUP_ID user
USER user

then build using

docker build -t "mbed_tools" .

You can add an alias like mbed_tools to use it like mbed-tools

alias mbed_docker='docker run -it -v $(pwd):/home/projects:cached mbed_tools mbed-tools'

Usage

Using above alias

╰─$ mbed_tools
Usage: mbed-tools [OPTIONS] COMMAND [ARGS]...

  Command line tool for interacting with Mbed OS.

...

Without alias

╰─$ docker run -it -v $(pwd):/home/projects:cached mbed_tools Usage: mbed-tools [OPTIONS] COMMAND [ARGS]...

  Command line tool for interacting with Mbed OS.
...

Todo

  • Reduce image size using alpine base image or multistage image.

Resources

About

a docker image for new mbed tools with cmake and ninja build


Languages

Language:Dockerfile 100.0%