Added possibility to build images from local source direactory

This commit is contained in:
Alexey Pustovalov 2024-08-14 16:40:30 +09:00
parent 5feedc18bc
commit 9e98b9fbf7
15 changed files with 90 additions and 15 deletions

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -48,7 +49,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -48,7 +49,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -48,7 +49,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -38,6 +38,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -58,7 +59,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -48,7 +49,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -50,7 +51,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -50,7 +51,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -50,7 +51,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -38,6 +38,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -60,7 +61,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
set -eux && \
cd /tmp/ && \
@ -50,7 +51,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
set -eux && \
cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -41,7 +42,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
set -eux && \
cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -41,7 +42,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
set -eux && \
cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -41,7 +42,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \

View File

@ -38,6 +38,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
set -eux && \
cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -51,7 +52,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \

View File

@ -28,6 +28,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=src/,target=/tmp/src \
set -eux && \
cd /tmp/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
@ -41,7 +42,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR} && \
if [ -f "/tmp/src/bootstrap.sh" ]; then \
cp -R /tmp/src ${ZBX_SOURCES_DIR}; \
else \
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH:-$ZBX_VERSION} --depth 1 --single-branch ${ZBX_SOURCES_DIR}; \
fi && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \