diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..6c14de55 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:18.04 + +RUN apt-get update && apt-get install -y --no-install-recommends \ +make gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi \ +autoconf automake libtool curl wget g++ unzip && \ +apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +RUN apt-get update && apt-get install -y --no-install-recommends \ +python python-pip libstdc++-arm-none-eabi-newlib && \ +apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/README.md b/README.md index 184ab5a9..ca39296b 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,18 @@ Project website: [flipperzero.one](https://flipperzero.one) (add code style, contribution guide here) -## Build +## Building + +### Build in docker container (main way) + +1. Install [docker compose](https://docs.docker.com/compose/install/) +2. After startup you should run `docker-compose up -d` to run the container. +3. Then you can run `docker-compose exec dev make` to build application. + +If Dockerfile is changed you should run `docker-compose down` and `docker-compose build` for rebuild the image. + +### Build in IDE -* docker image * Arduino IDE (in progress) * PlatformIO (in progress) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..0be371d5 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + dev: + build: . + network_mode: "host" + privileged: true + tty: true + stdin_open: true + volumes: + - .:/project +# - /dev/bus/usb:/dev/bus/usb + # working_dir: "/project/target_nucleo476" + # working_dir: "/project/target_bluepill" + working_dir: "/project/target_prod" + environment: + DISPLAY: $DISPLAY