mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
the new docker images are defaulting to a hardcoded tag that can be traced back to source code which is why we are adding the string to the build and run scripts
22 lines
549 B
Bash
Executable File
22 lines
549 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ -z "${DOCKER_TAG}" ]]; then
|
|
# the default tag for docker images
|
|
# follows the pattern below, and we recommend
|
|
# that any images pushed to the registry continue
|
|
# to use the pattern for consistency
|
|
TAG_NAME="`date +"%Y-%m-%d"`"
|
|
else
|
|
TAG_NAME="${DOCKER_TAG}"
|
|
fi
|
|
|
|
PX4_DOCKER_REPO="ghcr.io/px4/px4-dev:$TAG_NAME"
|
|
PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
SRC_DIR=$PWD/../
|
|
|
|
echo "[docker_build.sh]: Building [$PX4_DOCKER_REPO]"
|
|
|
|
docker build \
|
|
-t ${PX4_DOCKER_REPO} \
|
|
-f Tools/setup/Dockerfile "${SRC_DIR}"
|