Skip to content

Instantly share code, notes, and snippets.

@prathje
Created January 27, 2021 19:43
Show Gist options
  • Save prathje/0ca8d5c4daa747011e98339e87635da3 to your computer and use it in GitHub Desktop.
Save prathje/0ca8d5c4daa747011e98339e87635da3 to your computer and use it in GitHub Desktop.
BabbleSim with Zephyr Build Environment Dockerfile
FROM --platform=linux/amd64 zephyrprojectrtos/zephyr-build:latest as runtime
# Switch to root for installations
USER root
WORKDIR /bsim
ENV BSIM_OUT_PATH=/bsim/
ENV BSIM_COMPONENTS_PATH=/bsim/components/
# Setup essentials
RUN apt-get update -y
RUN apt-get install -y git nano build-essential
# Install dependencies
RUN apt-get install -y gcc-multilib fftw3-dev
# Set-up Android Repo Tools
RUN apt-get install -y curl python3 && curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > /bin/repo && chmod a+x /bin/repo
# RUN ln -s /usr/bin/python3 /usr/bin/python
ENV NRFX_BASE=/bsim/nrfx/
RUN git clone --branch=v2.4.0 https://github.com/NordicSemiconductor/nrfx.git /bsim/nrfx
USER user
FROM runtime as everything
USER root
# Synchronize BabbleSim repository
RUN repo init -u https://github.com/BabbleSim/manifest.git -m everything.xml -b master
RUN repo sync
# Switch back to normal user
# Build everything
RUN make everything -j 8
RUN chown -Rf user:user /bsim
USER user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment