add dockerfiles for build

This commit is contained in:
aanper 2020-08-07 09:51:41 +03:00
parent debca8a71b
commit 5f44b66be0
3 changed files with 37 additions and 2 deletions

10
Dockerfile Normal file
View File

@ -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/*

View File

@ -10,9 +10,18 @@ Project website: [flipperzero.one](https://flipperzero.one)
(add code style, contribution guide here) (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) * Arduino IDE (in progress)
* PlatformIO (in progress) * PlatformIO (in progress)

16
docker-compose.yml Normal file
View File

@ -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