Added logging of executed commands

This commit is contained in:
root
2019-05-30 21:21:16 +03:00
parent 2116d3c2f3
commit 044fb85c2a
37 changed files with 166 additions and 107 deletions

View File

@ -21,7 +21,8 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-alpine" \
STOPSIGNAL SIGTERM
RUN addgroup zabbix && \
RUN set -eux && \
addgroup zabbix && \
adduser -S \
-D -G zabbix \
-h /var/lib/zabbix/ \
@ -64,7 +65,8 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI
org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:alpine-${ZBX_VERSION}"
RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \
RUN set -eux && \
apk add ${APK_FLAGS_DEV} --virtual build-dependencies \
coreutils \
gettext \
git && \

View File

@ -9,7 +9,8 @@ ARG ZBX_SOURCES=https://git.zabbix.com/scm/zbx/zabbix.git
ENV TERM=xterm ZBX_VERSION=${ZBX_VERSION} ZBX_SOURCES=${ZBX_SOURCES} \
ZBX_TYPE=frontend ZBX_DB_TYPE=mysql ZBX_OPT_TYPE=nginx
RUN yum --quiet makecache && \
RUN set -eux && \
yum --quiet makecache && \
yum ${YUM_FLAGS_DEV} install \
gettext \
patch \
@ -56,7 +57,8 @@ STOPSIGNAL SIGTERM
COPY --from=builder /tmp/zabbix/ /usr/share/zabbix/
RUN groupadd --system zabbix && \
RUN set -eux && \
groupadd --system zabbix && \
adduser -r --shell /sbin/nologin \
-g zabbix \
-d /var/lib/zabbix/ \

View File

@ -21,8 +21,9 @@ LABEL org.label-schema.name="zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}-ubuntu" \
STOPSIGNAL SIGTERM
RUN apt-get ${APT_FLAGS_COMMON} update && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 && \
RUN set -eux && \
apt-get ${APT_FLAGS_COMMON} update && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install locales gnupg2 ca-certificates && \
locale-gen $LC_ALL && \
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
addgroup --system --quiet zabbix && \
@ -49,7 +50,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \
done; \
test -z "$found" && echo >&2 "error: failed to fetch GPG key $NGINX_GPGKEY" && exit 1; \
DISTRIB_CODENAME=$(/bin/bash -c 'source /etc/lsb-release && echo $DISTRIB_CODENAME') && \
echo "deb http://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
echo "deb https://nginx.org/packages/ubuntu/ $DISTRIB_CODENAME nginx" >> /etc/apt/sources.list.d/nginx.list && \
apt-get ${APT_FLAGS_COMMON} update && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_PERSISTENT} install \
curl \
@ -83,10 +84,10 @@ LABEL org.label-schema.usage="https://www.zabbix.com/documentation/${MAJOR_VERSI
org.label-schema.vcs-url="${ZBX_SOURCES}" \
org.label-schema.docker.cmd="docker run --name zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE} --link mysql-server:mysql --link zabbix-server:zabbix-server -p 80:80 -d zabbix-web-${ZBX_OPT_TYPE}-${ZBX_DB_TYPE}:ubuntu-${ZBX_VERSION}"
RUN apt-get ${APT_FLAGS_COMMON} update && \
RUN set -eux && \
apt-get ${APT_FLAGS_COMMON} update && \
DEBIAN_FRONTEND=noninteractive apt-get ${APT_FLAGS_DEV} install \
gettext \
ca-certificates \
git && \
cd /usr/share/ && \
git clone ${ZBX_SOURCES} --branch ${ZBX_VERSION} --depth 1 --single-branch zabbix-${ZBX_VERSION} && \