mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-16 02:57:36 +08:00
ba9b23c2d1
The new build script can pass arguments directly to ubuntu.sh when building, this is good for when you want a special build for example when you don't need RTPS or Simulation ``` ./Tools/docker_build.sh --no-sim-tools ``` In the future it can be extended if needed to generate multiple docker images based on the same Dockerfile, if for example we only want to build arm targets
21 lines
471 B
Bash
Executable File
21 lines
471 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ -z "${DOCKER_TAG}" ]]; then
|
|
TAG_NAME="latest"
|
|
else
|
|
TAG_NAME="${DOCKER_TAG}"
|
|
fi
|
|
|
|
PX4_DOCKER_REPO="px4io/px4-dev:$TAG_NAME"
|
|
BUILD_ARGS="${@}"
|
|
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
SRC_DIR=$PWD/../
|
|
|
|
echo "[docker_build.sh]: Building [$PX4_DOCKER_REPO]"
|
|
echo "[docker_build.sh]: - with args: [$BUILD_ARGS]"
|
|
|
|
docker build \
|
|
-t ${PX4_DOCKER_REPO} \
|
|
-f Tools/setup/Dockerfile "${SRC_DIR}" \
|
|
--build-arg INSTALL_ARGS="${BUILD_ARGS}"
|