Skip to content

Commit 698721a

Browse files
authored
allow less verbose container image build (netdata#5187)
[netdata release candidate]
1 parent b81bba7 commit 698721a

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

packaging/docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
ARG ARCH=amd64-v3.8
77
FROM multiarch/alpine:${ARCH} as builder
88

9+
ARG OUTPUT="/dev/stdout"
910
# Install prerequisites
1011
RUN apk --no-cache add alpine-sdk \
1112
autoconf \
@@ -33,8 +34,7 @@ WORKDIR /opt/netdata.git
3334

3435
# Install from source
3536
RUN chmod +x netdata-installer.sh && \
36-
sync && sleep 1 && \
37-
./netdata-installer.sh --dont-wait --dont-start-it
37+
./netdata-installer.sh --dont-wait --dont-start-it &>${OUTPUT}
3838

3939
# files to one directory
4040
RUN mkdir -p /app/usr/sbin/ \

packaging/docker/build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ docker run --rm --privileged multiarch/qemu-user-static:register --reset
3939

4040
# Build images using multi-arch Dockerfile.
4141
for ARCH in "${ARCHITECTURES[@]}"; do
42-
eval docker build --build-arg ARCH="${ARCH}-v3.8" \
43-
--tag "${REPOSITORY}:${VERSION}-${ARCH}" \
44-
--file packaging/docker/Dockerfile ./ ${BG}
42+
eval docker build \
43+
--build-arg ARCH="${ARCH}-v3.8" \
44+
--build-arg OUTPUT=/dev/null \
45+
--tag "${REPOSITORY}:${VERSION}-${ARCH}" \
46+
--file packaging/docker/Dockerfile ./ ${BG}
4547
done
4648
wait
4749

0 commit comments

Comments
 (0)