mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-08-09 16:45:05 +02:00
Added caching / avoid orphans mechanisms
This commit is contained in:
@ -33,9 +33,10 @@ LABEL description="Zabbix build base for MySQL based images" \
|
||||
ENV MONGODB_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/mongodb.git MONGODB_PLUGIN_VERSION=master \
|
||||
POSTGRESQL_PLUGIN_SOURCES=https://git.zabbix.com/scm/ap/postgresql.git POSTGRESQL_PLUGIN_VERSION=master
|
||||
|
||||
COPY ["conf/chromedp_no_sandbox.patch", "/tmp/chromedp_no_sandbox.patch"]
|
||||
|
||||
RUN set -eux && \
|
||||
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 \
|
||||
set -eux && \
|
||||
cd /tmp/ && \
|
||||
git -c advice.detachedHead=false clone ${ZBX_SOURCES} --branch ${GIT_BRANCH} --depth 1 --single-branch /tmp/zabbix-${ZBX_VERSION} && \
|
||||
cd /tmp/zabbix-${ZBX_VERSION} && \
|
||||
@ -107,5 +108,4 @@ RUN set -eux && \
|
||||
git -c advice.detachedHead=false clone ${POSTGRESQL_PLUGIN_SOURCES} --branch ${POSTGRESQL_PLUGIN_VERSION} --depth 1 --single-branch /tmp/postgresql_plugin && \
|
||||
cd /tmp/postgresql_plugin && \
|
||||
make && \
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql && \
|
||||
rm -rf $(go env GOCACHE)
|
||||
strip /tmp/postgresql_plugin/zabbix-agent2-plugin-postgresql
|
||||
|
Reference in New Issue
Block a user