Files
PX4-Autopilot/Tools/docker_build.sh
T
Ramon Roche ba9b23c2d1 docker: new build interface script
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
2022-08-02 09:52:55 -07:00

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}"