Skip to content

Instantly share code, notes, and snippets.

@disconn3ct
Created February 20, 2022 14:35
Show Gist options
  • Save disconn3ct/7b70d844a51e2ee40ec3d96a2db667eb to your computer and use it in GitHub Desktop.
Save disconn3ct/7b70d844a51e2ee40ec3d96a2db667eb to your computer and use it in GitHub Desktop.
betaflight docker build
FROM ubuntu:20.04
VOLUME /opt/betaflight
WORKDIR /opt/betaflight
RUN apt update; apt install -y make build-essential python git curl
COPY entrypoint.sh /sbin/entrypoint.sh
ENTRYPOINT [ "/sbin/entrypoint.sh" ]
CMD [ "make" ]
USER 1000:1000
#!/bin/bash
set -euo pipefail
cd /opt/betaflight
echo "**** Beginning Build ****"
echo "ARGS: " "$@"
echo "**** --------------- ****"
if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ]; then
set -- make "$@"
make arm_sdk_install
fi
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment