Skip to content
Patrick José Pereira edited this page Aug 18, 2021 · 21 revisions

How to build

  1. Install docker

Build with buildx

  1. Install docker buildx
  2. Enable docker experimental features
  3. Create a node to for armv7 with the correct configuration
    • docker buildx create --use --platform=linux/arm/v7 --buildkitd-flags '--allow-insecure-entitlement network.host --allow-insecure-entitlement security.insecure' --name arm-builder
  4. Pull latest changes to avoid building everything from scratch
    • docker pull --platform linux/arm/v7 bluerobotics/companion-core:master
  5. Build it
    • Be aware that crosscompiling the core image will take some time in a good computer.
    • docker buildx build --platform linux/arm/v7 . -t yourdockerhubuser/companion-core:yournewtag --push --output type=registry --progress=plain

Build with regular docker build (to run in the local machine)

  1. docker build . -t yourdockerhubuser/companion-core:yournewtag

Run the newly built image

  1. Navigate to http://localhost:8081 and the new tag should show in VersionChooser

Access docker terminal

You can access it via: sudo docker exec -it companion-core /usr/bin/tmux

Frontend

  1. To develop the frontend first install yarn on your system.
  2. Go to the frontend folder with cd core/frontend
  3. Install the necessary packages with yarn install
  4. Now just do your changes and try them with yarn serve

You can also lint your code anytime with yarn lint

Know problems

Is know that qemu-arm-static version 5.2.0 has DNS problems, so git clone step may fail, for more information check this builx issue.

  • Check qemu-arch-extra
Clone this wiki locally