-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update telegraf images to support various arm architectures #3465
Conversation
@tianon in this change, we're trying to add the ARM architectures. I wasn't quite sure the exact format to use to make it correct so I tried my best to use existing examples and the documentation. If there are any issues with the format, please tell me so that I can fix the script that generates these files. We also do not have any build machines with these architectures so these were tested by the users who helped us build the Dockerfiles for ARM. I think you guys do build tests though so that should be fine. Thanks! |
Diff:warning: insecure protocol git:// detected: git://github.com/influxdata/influxdata-docker
diff --git a/_bashbrew-arches b/_bashbrew-arches
index c6e1613..a6e0c3c 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -9,6 +9,10 @@ kapacitor:1.2.1-alpine @ amd64
kapacitor:alpine @ amd64
kapacitor:latest @ amd64
telegraf:1.3.5 @ amd64
+telegraf:1.3.5 @ arm32v7
+telegraf:1.3.5 @ arm64v8
telegraf:1.3.5-alpine @ amd64
telegraf:alpine @ amd64
telegraf:latest @ amd64
+telegraf:latest @ arm32v7
+telegraf:latest @ arm64v8
diff --git a/telegraf_1.3.5/Dockerfile b/telegraf_1.3.5/Dockerfile
index 4237207..807a40d 100644
--- a/telegraf_1.3.5/Dockerfile
+++ b/telegraf_1.3.5/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:trusty-curl
+FROM buildpack-deps:stretch-curl
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends snmp && \
@@ -14,11 +14,19 @@ RUN set -ex && \
done
ENV TELEGRAF_VERSION 1.3.5
-RUN wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_amd64.deb.asc && \
- wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_amd64.deb && \
- gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_amd64.deb.asc telegraf_${TELEGRAF_VERSION}-1_amd64.deb && \
- dpkg -i telegraf_${TELEGRAF_VERSION}-1_amd64.deb && \
- rm -f telegraf_${TELEGRAF_VERSION}-1_amd64.deb*
+RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
+ case "${dpkgArch##*-}" in \
+ amd64) ARCH='amd64';; \
+ arm64) ARCH='arm64';; \
+ armhf) ARCH='armhf';; \
+ armel) ARCH='armel';; \
+ *) echo "Unsupported architecture: ${dpkgArch}"; exit 1;; \
+ esac && \
+ wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc && \
+ wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
+ gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
+ dpkg -i telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
+ rm -f telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
diff --git a/telegraf_latest/Dockerfile b/telegraf_latest/Dockerfile
index 834f6ee..6f17aa9 100644
--- a/telegraf_latest/Dockerfile
+++ b/telegraf_latest/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:trusty-curl
+FROM buildpack-deps:stretch-curl
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends snmp && \
@@ -14,11 +14,19 @@ RUN set -ex && \
done
ENV TELEGRAF_VERSION 1.4.0
-RUN wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_amd64.deb.asc && \
- wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_amd64.deb && \
- gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_amd64.deb.asc telegraf_${TELEGRAF_VERSION}-1_amd64.deb && \
- dpkg -i telegraf_${TELEGRAF_VERSION}-1_amd64.deb && \
- rm -f telegraf_${TELEGRAF_VERSION}-1_amd64.deb*
+RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" && \
+ case "${dpkgArch##*-}" in \
+ amd64) ARCH='amd64';; \
+ arm64) ARCH='arm64';; \
+ armhf) ARCH='armhf';; \
+ armel) ARCH='armel';; \
+ *) echo "Unsupported architecture: ${dpkgArch}"; exit 1;; \
+ esac && \
+ wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc && \
+ wget -q https://dl.influxdata.com/telegraf/releases/telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
+ gpg --batch --verify telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb.asc telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
+ dpkg -i telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb && \
+ rm -f telegraf_${TELEGRAF_VERSION}-1_${ARCH}.deb*
EXPOSE 8125/udp 8092/udp 8094
Build test of #3465; ba84c2b ( $ bashbrew build chronograf:1.3
Building bashbrew/cache:eb1615e53c64b8f21a276cf9d1fa2be67fee5a389a46551fb5aa3d955cba6bd7 (chronograf:1.3)
Tagging chronograf:1.3
Tagging chronograf:1.3.8
Tagging chronograf:1.3.8.1
Tagging chronograf:latest
$ test/run.sh chronograf:1.3
testing chronograf:1.3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build chronograf:1.3-alpine
Building bashbrew/cache:b4a733fd1dd0c943c04e4dbea0241ae9ac9f30bd9c4b11e32a626795c6995380 (chronograf:1.3-alpine)
Tagging chronograf:1.3-alpine
Tagging chronograf:1.3.8-alpine
Tagging chronograf:1.3.8.1-alpine
Tagging chronograf:alpine
$ test/run.sh chronograf:1.3-alpine
testing chronograf:1.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build influxdb:1.2
Building bashbrew/cache:8b46abd00229ab8d2345842b2b939a0d29ee71b353231791cd3419ab5435bb40 (influxdb:1.2)
Tagging influxdb:1.2
Tagging influxdb:1.2.4
$ test/run.sh influxdb:1.2
testing influxdb:1.2
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build influxdb:1.2-alpine
Building bashbrew/cache:a9645f196ee024643bcf676055110ed44a371c019f344c50ee5bfe7712e41178 (influxdb:1.2-alpine)
Tagging influxdb:1.2-alpine
Tagging influxdb:1.2.4-alpine
$ test/run.sh influxdb:1.2-alpine
testing influxdb:1.2-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build influxdb:1.3
Building bashbrew/cache:624dbf616d5500ed1f251b11e9f00ff1f3f09367643e5e98c63e1118ba6006ee (influxdb:1.3)
Tagging influxdb:1.3
Tagging influxdb:1.3.5
Tagging influxdb:latest
$ test/run.sh influxdb:1.3
testing influxdb:1.3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build influxdb:1.3-alpine
Building bashbrew/cache:6de449e4e587940505cbc471afbd3747a24990047d1d0d21181b88092049e888 (influxdb:1.3-alpine)
Tagging influxdb:1.3-alpine
Tagging influxdb:1.3.5-alpine
Tagging influxdb:alpine
$ test/run.sh influxdb:1.3-alpine
testing influxdb:1.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kapacitor:1.2
Building bashbrew/cache:b0d4cffea876efb12f0aafa0e42140b6bdc558836d8f274cb171c9d9f69e00cf (kapacitor:1.2)
Tagging kapacitor:1.2
Tagging kapacitor:1.2.1
$ test/run.sh kapacitor:1.2
testing kapacitor:1.2
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kapacitor:1.2-alpine
Building bashbrew/cache:d333d269e20f39d7825b5cca84074a8d690033acde3e835c94811a7311b1692f (kapacitor:1.2-alpine)
Tagging kapacitor:1.2-alpine
Tagging kapacitor:1.2.1-alpine
$ test/run.sh kapacitor:1.2-alpine
testing kapacitor:1.2-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kapacitor:1.3
Building bashbrew/cache:56eb4a6dd943104be64bfbf1477154f0af9f53612a63ae7af0d71a6c0e4567ca (kapacitor:1.3)
Tagging kapacitor:1.3
Tagging kapacitor:1.3.3
Tagging kapacitor:latest
$ test/run.sh kapacitor:1.3
testing kapacitor:1.3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build kapacitor:1.3-alpine
Building bashbrew/cache:2ecdaa15cb8f98242fd5c1c2325bbbd3a361c3c93af6c3c050e678001f323d67 (kapacitor:1.3-alpine)
Tagging kapacitor:1.3-alpine
Tagging kapacitor:1.3.3-alpine
Tagging kapacitor:alpine
$ test/run.sh kapacitor:1.3-alpine
testing kapacitor:1.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build telegraf:1.3
Building bashbrew/cache:8e8b52213b381fe8fc21cfd2a28346b0cc8496cb74e5f94e194984b6a30b48e8 (telegraf:1.3)
Tagging telegraf:1.3
Tagging telegraf:1.3.5
$ test/run.sh telegraf:1.3
testing telegraf:1.3
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build telegraf:1.3-alpine
Building bashbrew/cache:f6183c4cebae35e19dd041c9a0860ca9bf5a140a2dcde5666c145d50dd4b4800 (telegraf:1.3-alpine)
Tagging telegraf:1.3-alpine
Tagging telegraf:1.3.5-alpine
$ test/run.sh telegraf:1.3-alpine
testing telegraf:1.3-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build telegraf:1.4
Building bashbrew/cache:ece0c6c0d95d0245eef37ad0dc8ac7527e24e222eb40194e437550a476d613b0 (telegraf:1.4)
Tagging telegraf:1.4
Tagging telegraf:1.4.0
Tagging telegraf:latest
$ test/run.sh telegraf:1.4
testing telegraf:1.4
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
$ bashbrew build telegraf:1.4-alpine
Building bashbrew/cache:dcf3bb8ffe00666f91e51e8afb106239741342aeae24f90dda734c7477ab0ff7 (telegraf:1.4-alpine)
Tagging telegraf:1.4-alpine
Tagging telegraf:1.4.0-alpine
Tagging telegraf:alpine
$ test/run.sh telegraf:1.4-alpine
testing telegraf:1.4-alpine
'utc' [1/4]...passed
'cve-2014--shellshock' [2/4]...passed
'no-hard-coded-passwords' [3/4]...passed
'override-cmd' [4/4]...passed
|
Is there an extra step for building the ARM images? I'm trying to pull telegraf from a Raspberry Pi and getting this message:
Did I make an error in modifying the |
Nope, its just that many of our images compile from source and our arm32 server is slow and fails often, so it has a constant backlog of rescheduled builds. The arm64 version is up and the build finished on arm32v7: https://hub.docker.com/r/arm32v7/telegraf/, so it should be pushed into the manifest list within an hour. |
I can confirm it's working now. Thanks. Is there any way to see pending builds for images? |
The build jobs should all be listed here on our Jenkins server: https://doi-janky.infosiftr.net/job/multiarch/view/images/. And these are the two jobs that push the manifest lists. |
No description provided.