mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2024-12-12 17:41:11 +01:00
Added possibility to build images from local source direactory
This commit is contained in:
parent
c080681229
commit
878ea829e0
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -54,7 +55,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
|||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -35,6 +35,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -64,7 +65,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
|||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -54,7 +55,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
|||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -56,7 +57,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
|||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/agent/sbin/ && \
|
||||||
@ -37,7 +38,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
|||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -35,6 +35,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -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/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
@ -25,6 +25,7 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
|
|||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
||||||
--mount=type=cache,target=/root/go/ \
|
--mount=type=cache,target=/root/go/ \
|
||||||
|
--mount=type=bind,source=src/,target=/tmp/src \
|
||||||
set -eux && \
|
set -eux && \
|
||||||
ARCH_SUFFIX="$(arch)"; \
|
ARCH_SUFFIX="$(arch)"; \
|
||||||
case "$ARCH_SUFFIX" in \
|
case "$ARCH_SUFFIX" in \
|
||||||
@ -56,7 +57,11 @@ RUN --mount=type=cache,target=/root/.cache/go-build/ \
|
|||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/sbin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
mkdir -p ${ZBX_OUTPUT_DIR}/general/bin/ && \
|
||||||
mkdir -p ${ZBX_OUTPUT_DIR}/general/conf/ && \
|
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} && \
|
cd ${ZBX_SOURCES_DIR} && \
|
||||||
zabbix_revision=`git rev-parse --short HEAD` && \
|
zabbix_revision=`git rev-parse --short HEAD` && \
|
||||||
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
|
||||||
|
Loading…
Reference in New Issue
Block a user