Created
February 20, 2022 14:35
-
-
Save disconn3ct/7b70d844a51e2ee40ec3d96a2db667eb to your computer and use it in GitHub Desktop.
betaflight docker build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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