File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1
1
ARG BUILD_FROM=ubuntu:20.04
2
2
FROM ${BUILD_FROM}
3
3
4
+ ENV EMQX_BUILDER_IMAGE=${BUILD_FROM}
5
+
4
6
ARG OTP_VERSION
5
7
6
8
COPY get-otp.sh /get-otp.sh
@@ -14,10 +16,9 @@ RUN /get-elixir.sh ${ELIXIR_VERSION}
14
16
RUN mkdir /tools
15
17
16
18
ARG EMQTT_BENCH_REF
17
- ENV EMQTT_BENCH_REF=${EMQTT_BENCH_REF:-0.4.5-alpha.1}
18
19
19
- RUN git clone --depth=1 --branch=${EMQTT_BENCH_REF} https://github.com/emqx/ emqtt-bench.git /tools/ emqtt-bench \
20
- && make -C /tools/ emqtt-bench
20
+ COPY get- emqtt-bench.sh /get- emqtt-bench.sh
21
+ RUN /get- emqtt-bench.sh "${EMQTT_BENCH_REF:-0.4.5-alpha.1}"
21
22
22
23
ENV PATH="/tools/emqtt-bench:$PATH"
23
24
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -xeuo pipefail
4
+
5
+ VSN=" $1 "
6
+
7
+ if grep -q -i ' rhel' /etc/os-release; then
8
+ DIST=' el'
9
+ VERSION_ID=" $( rpm --eval ' %{rhel}' ) "
10
+ else
11
+ DIST=" $( sed -n ' /^ID=/p' /etc/os-release | sed -r ' s/ID=(.*)/\1/g' | sed ' s/"//g' ) "
12
+ VERSION_ID=" $( sed -n ' /^VERSION_ID=/p' /etc/os-release | sed -r ' s/VERSION_ID=(.*)/\1/g' | sed ' s/"//g' ) "
13
+ fi
14
+ SYSTEM=" $( echo " ${DIST}${VERSION_ID} " | sed -r ' s/([a-zA-Z]*)-.*/\1/g' ) "
15
+
16
+ # no quic on raspbian9 and centos7
17
+ case " $SYSTEM " in
18
+ * raspbian9* )
19
+ export BUILD_WITHOUT_QUIC=1
20
+ ;;
21
+ * el7* )
22
+ export BUILD_WITHOUT_QUIC=1
23
+ ;;
24
+ * )
25
+ true
26
+ ;;
27
+ esac
28
+
29
+ git clone --depth=1 --branch=" ${VSN} " https://github.com/emqx/emqtt-bench.git /tools/emqtt-bench
30
+ make -C /tools/emqtt-bench
You can’t perform that action at this time.
0 commit comments