mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-11 16:18:52 +01:00
Added --no-network flag for build packages purge operation in Alpine images
This commit is contained in:
commit
c42510941a
@ -1,13 +1,10 @@
|
|||||||
# DB_SERVER_HOST=mysql-server
|
# DB_SERVER_HOST=mysql-server
|
||||||
# DB_SERVER_PORT=3306
|
# DB_SERVER_PORT=3306
|
||||||
# MYSQL_USER=zabbix
|
# MYSQL_USER=zabbix
|
||||||
# MYSQL_USER=zabbix
|
|
||||||
MYSQL_USER_FILE=/run/secrets/MYSQL_USER
|
MYSQL_USER_FILE=/run/secrets/MYSQL_USER
|
||||||
# MYSQL_PASSWORD=zabbix
|
# MYSQL_PASSWORD=zabbix
|
||||||
# MYSQL_PASSWORD=zabbix
|
|
||||||
MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD
|
MYSQL_PASSWORD_FILE=/run/secrets/MYSQL_PASSWORD
|
||||||
# MYSQL_ROOT_PASSWORD=
|
# MYSQL_ROOT_PASSWORD=
|
||||||
# MYSQL_ROOT_PASSWORD=root_pwd
|
|
||||||
MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
|
MYSQL_ROOT_PASSWORD_FILE=/run/secrets/MYSQL_ROOT_PASSWORD
|
||||||
# MYSQL_ALLOW_EMPTY_PASSWORD=false
|
# MYSQL_ALLOW_EMPTY_PASSWORD=false
|
||||||
# MYSQL_DATABASE=zabbix
|
# MYSQL_DATABASE=zabbix
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
# DB_SERVER_HOST=postgres-server
|
# DB_SERVER_HOST=postgres-server
|
||||||
# DB_SERVER_PORT=5432
|
# DB_SERVER_PORT=5432
|
||||||
# POSTGRES_USER=zabbix
|
# POSTGRES_USER=zabbix
|
||||||
POSTGRES_USER=zabbix
|
POSTGRES_USER_FILE=/run/secrets/POSTGRES_USER
|
||||||
# POSTGRES_USER_FILE=/run/secrets/POSTGRES_USER
|
|
||||||
# POSTGRES_PASSWORD=zabbix
|
# POSTGRES_PASSWORD=zabbix
|
||||||
POSTGRES_PASSWORD=zabbix
|
POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD
|
||||||
# POSTGRES_PASSWORD_FILE=/run/secrets/POSTGRES_PASSWORD
|
|
||||||
# POSTGRES_DB=zabbix
|
# POSTGRES_DB=zabbix
|
||||||
POSTGRES_DB=zabbix
|
POSTGRES_DB=zabbix
|
||||||
# DB_SERVER_SCHEMA=public
|
# DB_SERVER_SCHEMA=public
|
||||||
|
@ -91,7 +91,7 @@ RUN set -eux && \
|
|||||||
cp /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
|
cp /tmp/zabbix-${ZBX_VERSION}/conf/zabbix_agentd.conf /etc/zabbix/zabbix_agentd.conf && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
49
generate-stackbrew-library.sh
Executable file
49
generate-stackbrew-library.sh
Executable file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
declare -a -r versions=( 3.0.28 4.0.11 4.2.5 )
|
||||||
|
|
||||||
|
self="${BASH_SOURCE##*/}"
|
||||||
|
|
||||||
|
# get the most recent commit which modified any of "$@"
|
||||||
|
fileCommit() {
|
||||||
|
git log -1 --format='format:%H' HEAD -- "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
# prints "$2$1$3$1...$N"
|
||||||
|
join() {
|
||||||
|
local sep="$1"; shift
|
||||||
|
local out; printf -v out "${sep//%/%%}%s" "$@"
|
||||||
|
echo "${out#$sep}"
|
||||||
|
}
|
||||||
|
|
||||||
|
cat <<-EOH
|
||||||
|
# this file is generated via https://github.com/zabbix/zabbix-docker/blob/$(fileCommit "$self")/$self
|
||||||
|
|
||||||
|
Maintainers: Alexey Pustovalov <alexey.pustovalov@zabbix.com> (@dotneft)
|
||||||
|
GitRepo: https://github.com/zabbix/zabbix-docker.git
|
||||||
|
EOH
|
||||||
|
|
||||||
|
for version in "${versions[@]}"; do
|
||||||
|
major_version=${version%.*}
|
||||||
|
commit=`git rev-list -n 1 "$version"`
|
||||||
|
|
||||||
|
for component in agent java-gateway proxy-{mysql,sqlite3} server-{mysql,pgsql} web-{apache,nginx}-{mysql,pgsql}; do
|
||||||
|
for variant in alpine; do
|
||||||
|
dir="${component}/${variant}"
|
||||||
|
[ -f "$dir/Dockerfile" ] || continue
|
||||||
|
|
||||||
|
variantArches=( amd64 )
|
||||||
|
|
||||||
|
echo
|
||||||
|
cat <<-EOE
|
||||||
|
Tags: $version-$component, $major_version-$component
|
||||||
|
Architectures: $(join ', ' "${variantArches[@]}")
|
||||||
|
GitCommit: $commit
|
||||||
|
GitFetch: refs/heads/$major_version
|
||||||
|
Directory: $dir
|
||||||
|
EOE
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
@ -73,7 +73,7 @@ RUN set -eux && \
|
|||||||
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
rm -rf /usr/sbin/zabbix_java/lib/*.xml && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ RUN set -eux && \
|
|||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ RUN set -eux && \
|
|||||||
chown --quiet -R zabbix:root /etc/zabbix && \
|
chown --quiet -R zabbix:root /etc/zabbix && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ RUN set -eux && \
|
|||||||
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
cp database/${ZBX_DB_TYPE}/create.sql.gz /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ RUN set -eux && \
|
|||||||
cp database/${ZBX_DB_TYPE}/timescaledb.sql /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
cp database/${ZBX_DB_TYPE}/timescaledb.sql /usr/share/doc/zabbix-${ZBX_TYPE}-${ZBX_DB_TYPE}/ && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ RUN set -eux && \
|
|||||||
"/etc/snmp/snmptrapfmt.conf" && \
|
"/etc/snmp/snmptrapfmt.conf" && \
|
||||||
rm -rf /tmp/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz && \
|
rm -rf /tmp/snmptrapfmt_1.14+nmu1ubuntu2.tar.gz && \
|
||||||
rm -rf /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ && \
|
rm -rf /tmp/snmptrapfmt-1.14+nmu1ubuntu1/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ RUN set -eux && \
|
|||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
chown --quiet -R apache:apache /usr/share/zabbix/ && \
|
chown --quiet -R apache:apache /usr/share/zabbix/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ RUN set -eux && \
|
|||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
chown --quiet -R apache:apache /usr/share/zabbix/ && \
|
chown --quiet -R apache:apache /usr/share/zabbix/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ RUN set -eux && \
|
|||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
chown --quiet -R nginx:nginx /usr/share/zabbix/ && \
|
chown --quiet -R nginx:nginx /usr/share/zabbix/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ RUN set -eux && \
|
|||||||
rm -rf tests && \
|
rm -rf tests && \
|
||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
chown --quiet -R nginx:nginx /usr/share/zabbix/ && \
|
chown --quiet -R nginx:nginx /usr/share/zabbix/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ RUN set -eux && \
|
|||||||
./locale/make_mo.sh && \
|
./locale/make_mo.sh && \
|
||||||
cd /tmp/ && \
|
cd /tmp/ && \
|
||||||
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
|
||||||
apk del ${APK_FLAGS_COMMON} --purge \
|
apk del ${APK_FLAGS_COMMON} --purge --no-network \
|
||||||
build-dependencies && \
|
build-dependencies && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user