-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.canary-checker
91 lines (76 loc) · 3.06 KB
/
Dockerfile.canary-checker
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM --platform=${BUILDPLATFORM:-linux/amd64} flanksource/base-image as base
ARG TARGETARCH
WORKDIR /app
ARG TARGETARCH
RUN apt-get update && \
apt-get install -y python3 python3-pip zip --no-install-recommends && \
rm -Rf /var/lib/apt/lists/* && \
rm -Rf /usr/share/doc && rm -Rf /usr/share/man && \
apt-get clean
FROM base as jre
ENV SDKMAN_DIR="/usr/lib/sdkman"
RUN apt-get update && apt-get install -y binutils --no-install-recommends
ENV JAVA_VERSION=21.0.2-tem
ENV JMETER_VERSION=5.6
ENV JMETER_HOME=${SDKMAN_DIR}/candidates/jmeter/${JMETER_VERSION}
ENV JAVA_HOME=${SDKMAN_DIR}/candidates/java/${JAVA_VERSION}
ENV PATH="$PATH:$SDKMAN_DIR/bin:$JAVA_HOME/bin:$JMETER_HOME/bin"
SHELL [ "bash", "-c" ]
RUN curl -s "https://get.sdkman.io?rcupdate=false" | bash && \
. $SDKMAN_DIR/bin/sdkman-init.sh && \
sdk install java ${JAVA_VERSION} ${JAVA_HOME} && \
sdk install jmeter ${JMETER_VERSION} ${JMETER_HOME} && \
sdk flush tmp
RUN rm -rf $SDKMAN_DIR/candidates/jmeter/current/docs && \
rm -rf $SDKMAN_DIR/candidates/jmeter/current/printable_docs
RUN jlink \
--verbose \
--add-modules ALL-MODULE-PATH \
--strip-debug \
--no-man-pages \
--no-header-files \
--output /javaruntime
FROM base
ENV JAVA_HOME=/opt/java
ENV JMETER_HOME=/opt/jmeter
COPY --from=jre /javaruntime $JAVA_HOME
COPY --from=jre /usr/lib/sdkman/candidates/jmeter/current /opt/jmeter
ENV PATH "${JAVA_HOME}/bin:${JMETER_HOME}/bin:${PATH}"
RUN pip3 install pip pyyaml lxml requests robotframework \
robotframework \
robotframework-jsonlibrary \
robotframework-jsonschemalibrary \
robotframework-requests \
robotframework-restlibrary \
robotframework-seleniumlibrary \
robotframework-excellib \
robotframework-crypto \
robotframework-databaselibrary \
psycopg2-binary \
PyMySQL && \
pip3 cache purge
# Restic
ENV RESTIC_VERSION=0.15.2
RUN curl -L https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic_${RESTIC_VERSION}_linux_${TARGETARCH}.bz2 -o restic.bz2 && \
bunzip2 /app/restic.bz2 && \
chmod +x /app/restic && \
mv /app/restic /usr/local/bin/ && \
rm -rf /app/restic.bz2
# Mergestat
# Unsupported in arm64 as of yet
RUN curl -L https://github.com/flanksource/askgit/releases/download/v0.61.0-flanksource.1/mergestat-linux-amd64.tar.gz -o mergestat.tar.gz && \
tar zxf mergestat.tar.gz -C /usr/local/bin/ && \
rm mergestat.tar.gz
# K6
ENV K6_VERSION=v0.47.0
RUN curl -L https://github.com/grafana/k6/releases/download/${K6_VERSION}/k6-${K6_VERSION}-linux-${TARGETARCH}.tar.gz -o k6.tar.gz && \
tar xvf k6.tar.gz && \
mv k6-${K6_VERSION}-linux-${TARGETARCH}/k6 /usr/local/bin/k6 && \
rm k6.tar.gz
# Benthos: high performance and resilient stream processor
RUN curl -Lsf https://sh.benthos.dev | bash -s -- 4.22.0
# dsq: commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more
RUN curl -L https://github.com/multiprocessio/dsq/releases/download/v0.23.0/dsq-linux-x64-v0.23.0.zip -o dsq.zip && \
unzip -q dsq.zip && \
mv dsq /usr/local/bin/dsq && \
rm dsq.zip