mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-03-23 18:13:49 +08:00
Update the local Docker convenience script to use the unified px4io/px4-dev image instead of the retired per-toolchain images (px4-dev-clang, px4-dev-simulation-bionic). Usage: ./Tools/docker_run.sh make px4_sitl_default ./Tools/docker_run.sh make tests TESTFILTER=ULogMessages PX4_DOCKER_REPO="px4io/px4-dev:custom" ./Tools/docker_run.sh make px4_fmu-v6x_default Changes: - Default to px4io/px4-dev:v1.17.0-beta1, remove conditional image guessing for clang/tests targets - Remove stale env passthrough (Travis CI, AWS, Codecov, Coveralls) - Keep CCACHE_DIR and sanitizer flags (PX4_ASAN/MSAN/TSAN/UBSAN) - Fix $PWD shadowing by renaming to SCRIPT_DIR - Use "$@" instead of "$1 $2 $3" for proper argument forwarding Signed-off-by: Ramon Roche <mrpollo@gmail.com>
28 lines
669 B
Bash
Executable File
28 lines
669 B
Bash
Executable File
#! /bin/bash
|
|
|
|
if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
|
PX4_DOCKER_REPO="px4io/px4-dev:v1.17.0-beta1"
|
|
else
|
|
echo "PX4_DOCKER_REPO is set to '$PX4_DOCKER_REPO'";
|
|
fi
|
|
|
|
echo "PX4_DOCKER_REPO: $PX4_DOCKER_REPO";
|
|
|
|
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
SRC_DIR=${SCRIPT_DIR}/../
|
|
|
|
CCACHE_DIR=${HOME}/.ccache
|
|
mkdir -p "${CCACHE_DIR}"
|
|
|
|
docker run -it --rm -w "${SRC_DIR}" \
|
|
--user="$(id -u):$(id -g)" \
|
|
--env=CCACHE_DIR="${CCACHE_DIR}" \
|
|
--env=PX4_ASAN \
|
|
--env=PX4_MSAN \
|
|
--env=PX4_TSAN \
|
|
--env=PX4_UBSAN \
|
|
--publish 14556:14556/udp \
|
|
--volume=${CCACHE_DIR}:${CCACHE_DIR}:rw \
|
|
--volume=${SRC_DIR}:${SRC_DIR}:rw \
|
|
${PX4_DOCKER_REPO} /bin/bash -c "$@"
|