Skip to content

Commit

Permalink
Added ability to specify local git directory in ZBX_SOURCES
Browse files Browse the repository at this point in the history
  • Loading branch information
sokurenko committed Aug 1, 2024
1 parent ed1b8ef commit eead5fd
Show file tree
Hide file tree
Showing 15 changed files with 51 additions and 34 deletions.
5 changes: 3 additions & 2 deletions Dockerfiles/build-mysql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -51,7 +53,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-mysql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -51,7 +53,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
15 changes: 9 additions & 6 deletions Dockerfiles/build-mysql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}

LABEL org.opencontainers.image.authors="Alexey Pustovalov <[email protected]>" \
org.opencontainers.image.description="Zabbix build base for MySQL based images" \
org.opencontainers.image.documentation="https://www.zabbix.com/documentation/${MAJOR_VERSION}/manual/installation/containers" \
Expand All @@ -22,10 +24,12 @@ LABEL org.opencontainers.image.authors="Alexey Pustovalov <alexey.pustovalov@zab

ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_VERSION}-output \
DB_TYPE=mysql \
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
Expand All @@ -49,7 +53,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-mysql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION
ARG RELEASE
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand Down Expand Up @@ -40,6 +40,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -62,7 +64,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-mysql/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -51,7 +53,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-pgsql/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -53,7 +55,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-pgsql/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -53,7 +55,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-pgsql/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -53,7 +55,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-pgsql/rhel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder
ARG MAJOR_VERSION
ARG RELEASE
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand Down Expand Up @@ -40,6 +40,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -64,7 +66,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-pgsql/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
--mount=type=bind,source=conf/chromedp_no_sandbox.patch,target=/tmp/chromedp_no_sandbox.patch \
Expand All @@ -53,7 +55,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
patch -p1 < /tmp/chromedp_no_sandbox.patch && \
zabbix_revision=`git rev-parse --short HEAD` && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-sqlite3/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
set -eux && \
Expand All @@ -44,7 +46,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-sqlite3/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
set -eux && \
Expand All @@ -44,7 +46,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
Expand Down
5 changes: 3 additions & 2 deletions Dockerfiles/build-sqlite3/ol/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ FROM ${BUILD_BASE_IMAGE} AS builder

ARG MAJOR_VERSION
ARG ZBX_VERSION
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git#${GIT_BRANCH:-$ZBX_VERSION}
ARG GIT_BRANCH

ARG ZBX_PLUGINS_VERSION=${GIT_BRANCH:-$ZBX_VERSION}
Expand All @@ -29,6 +29,8 @@ ENV ZBX_SOURCES_DIR=/tmp/zabbix-${ZBX_VERSION} ZBX_OUTPUT_DIR=/tmp/zabbix-${ZBX_
MSSQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mssql.git MSSQL_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION} \
EMBER_PLUS_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/ember-plus.git EMBER_PLUS_PLUGIN_VERSION=${ZBX_PLUGINS_VERSION}

ADD --keep-git-dir=true ${ZBX_SOURCES} ${ZBX_SOURCES_DIR}

RUN --mount=type=cache,target=/root/.cache/go-build/ \
--mount=type=cache,target=/root/go/ \
set -eux && \
Expand All @@ -44,7 +46,6 @@ 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} && \
cd ${ZBX_SOURCES_DIR} && \
zabbix_revision=`git rev-parse --short HEAD` && \
sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \
Expand Down
Loading

0 comments on commit eead5fd

Please sign in to comment.