Skip to content
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 chronograf, kapacitor, and influxdb to make ARM compatible #3481

Merged
merged 1 commit into from
Sep 21, 2017

Conversation

jsternberg
Copy link
Contributor

No description provided.

@tianon
Copy link
Member

tianon commented Sep 21, 2017

Diff:
warning: insecure protocol git:// detected: git://github.com/influxdata/influxdata-docker
diff --git a/_bashbrew-arches b/_bashbrew-arches
index a6e0c3c..ac346ca 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1,13 +1,23 @@
 chronograf:alpine @ amd64
 chronograf:latest @ amd64
+chronograf:latest @ arm32v7
+chronograf:latest @ arm64v8
 influxdb:1.2.4 @ amd64
+influxdb:1.2.4 @ arm32v7
+influxdb:1.2.4 @ arm64v8
 influxdb:1.2.4-alpine @ amd64
 influxdb:alpine @ amd64
 influxdb:latest @ amd64
+influxdb:latest @ arm32v7
+influxdb:latest @ arm64v8
 kapacitor:1.2.1 @ amd64
+kapacitor:1.2.1 @ arm32v7
+kapacitor:1.2.1 @ arm64v8
 kapacitor:1.2.1-alpine @ amd64
 kapacitor:alpine @ amd64
 kapacitor:latest @ amd64
+kapacitor:latest @ arm32v7
+kapacitor:latest @ arm64v8
 telegraf:1.3.5 @ amd64
 telegraf:1.3.5 @ arm32v7
 telegraf:1.3.5 @ arm64v8
diff --git a/chronograf_latest/Dockerfile b/chronograf_latest/Dockerfile
index 4efb920..3ca1289 100644
--- a/chronograf_latest/Dockerfile
+++ b/chronograf_latest/Dockerfile
@@ -1,6 +1,8 @@
-FROM debian:jessie-slim
+FROM debian:stretch-slim
 
 RUN set -ex && \
+    apt-get update && apt-get install -y gpg dirmngr --no-install-recommends && \
+    rm -rf /var/lib/apt/lists/* && \
     for key in \
         05CE15085FC09D18E99EFB22684A14CF2582E0C5 ; \
     do \
@@ -10,9 +12,16 @@ RUN set -ex && \
     done
 
 ENV CHRONOGRAF_VERSION 1.3.8.1
-RUN buildDeps='curl' \
+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 && \
     set -x && \
-    apt-get update && apt-get install -y ca-certificates $buildDeps --no-install-recommends && \
+    apt-get update && apt-get install -y ca-certificates curl --no-install-recommends && \
     rm -rf /var/lib/apt/lists/* && \
     curl -SLO "https://dl.influxdata.com/chronograf/releases/chronograf_${CHRONOGRAF_VERSION}_amd64.deb.asc" && \
     curl -SLO "https://dl.influxdata.com/chronograf/releases/chronograf_${CHRONOGRAF_VERSION}_amd64.deb" && \
diff --git a/influxdb_1.2.4/Dockerfile b/influxdb_1.2.4/Dockerfile
index 30e27fe..cb779ff 100644
--- a/influxdb_1.2.4/Dockerfile
+++ b/influxdb_1.2.4/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie-curl
+FROM buildpack-deps:stretch-curl
 
 RUN set -ex && \
     for key in \
@@ -10,11 +10,19 @@ RUN set -ex && \
     done
 
 ENV INFLUXDB_VERSION 1.2.4
-RUN wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb.asc && \
-    wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb && \
-    gpg --batch --verify influxdb_${INFLUXDB_VERSION}_amd64.deb.asc influxdb_${INFLUXDB_VERSION}_amd64.deb && \
-    dpkg -i influxdb_${INFLUXDB_VERSION}_amd64.deb && \
-    rm -f influxdb_${INFLUXDB_VERSION}_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/influxdb/releases/influxdb_${INFLUXDB_VERSION}_${ARCH}.deb.asc && \
+    wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_${ARCH}.deb && \
+    gpg --batch --verify influxdb_${INFLUXDB_VERSION}_${ARCH}.deb.asc influxdb_${INFLUXDB_VERSION}_${ARCH}.deb && \
+    dpkg -i influxdb_${INFLUXDB_VERSION}_${ARCH}.deb && \
+    rm -f influxdb_${INFLUXDB_VERSION}_${ARCH}.deb*
 COPY influxdb.conf /etc/influxdb/influxdb.conf
 
 EXPOSE 8086
diff --git a/influxdb_latest/Dockerfile b/influxdb_latest/Dockerfile
index 16547e5..796b956 100644
--- a/influxdb_latest/Dockerfile
+++ b/influxdb_latest/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie-curl
+FROM buildpack-deps:stretch-curl
 
 RUN set -ex && \
     for key in \
@@ -10,11 +10,19 @@ RUN set -ex && \
     done
 
 ENV INFLUXDB_VERSION 1.3.5
-RUN wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb.asc && \
-    wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_amd64.deb && \
-    gpg --batch --verify influxdb_${INFLUXDB_VERSION}_amd64.deb.asc influxdb_${INFLUXDB_VERSION}_amd64.deb && \
-    dpkg -i influxdb_${INFLUXDB_VERSION}_amd64.deb && \
-    rm -f influxdb_${INFLUXDB_VERSION}_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/influxdb/releases/influxdb_${INFLUXDB_VERSION}_${ARCH}.deb.asc && \
+    wget -q https://dl.influxdata.com/influxdb/releases/influxdb_${INFLUXDB_VERSION}_${ARCH}.deb && \
+    gpg --batch --verify influxdb_${INFLUXDB_VERSION}_${ARCH}.deb.asc influxdb_${INFLUXDB_VERSION}_${ARCH}.deb && \
+    dpkg -i influxdb_${INFLUXDB_VERSION}_${ARCH}.deb && \
+    rm -f influxdb_${INFLUXDB_VERSION}_${ARCH}.deb*
 COPY influxdb.conf /etc/influxdb/influxdb.conf
 
 EXPOSE 8086
diff --git a/kapacitor_1.2.1/Dockerfile b/kapacitor_1.2.1/Dockerfile
index eb510cc..914625a 100644
--- a/kapacitor_1.2.1/Dockerfile
+++ b/kapacitor_1.2.1/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie-curl
+FROM buildpack-deps:stretch-curl
 
 RUN set -ex && \
     for key in \
@@ -10,11 +10,19 @@ RUN set -ex && \
     done
 
 ENV KAPACITOR_VERSION 1.2.1
-RUN wget -q https://dl.influxdata.com/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_amd64.deb.asc && \
-    wget -q https://dl.influxdata.com/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_amd64.deb && \
-    gpg --batch --verify kapacitor_${KAPACITOR_VERSION}_amd64.deb.asc kapacitor_${KAPACITOR_VERSION}_amd64.deb && \
-    dpkg -i kapacitor_${KAPACITOR_VERSION}_amd64.deb && \
-    rm -f kapacitor_${KAPACITOR_VERSION}_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/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb.asc && \
+    wget -q https://dl.influxdata.com/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb && \
+    gpg --batch --verify kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb.asc kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb && \
+    dpkg -i kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb && \
+    rm -f kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb*
 COPY kapacitor.conf /etc/kapacitor/kapacitor.conf
 
 EXPOSE 9092
diff --git a/kapacitor_latest/Dockerfile b/kapacitor_latest/Dockerfile
index bef28b8..7891f16 100644
--- a/kapacitor_latest/Dockerfile
+++ b/kapacitor_latest/Dockerfile
@@ -1,4 +1,4 @@
-FROM buildpack-deps:jessie-curl
+FROM buildpack-deps:stretch-curl
 
 RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y bash-completion && \
@@ -15,11 +15,19 @@ RUN set -ex && \
     done
 
 ENV KAPACITOR_VERSION 1.3.3
-RUN wget -q https://dl.influxdata.com/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_amd64.deb.asc && \
-    wget -q https://dl.influxdata.com/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_amd64.deb && \
-    gpg --batch --verify kapacitor_${KAPACITOR_VERSION}_amd64.deb.asc kapacitor_${KAPACITOR_VERSION}_amd64.deb && \
-    dpkg -i kapacitor_${KAPACITOR_VERSION}_amd64.deb && \
-    rm -f kapacitor_${KAPACITOR_VERSION}_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/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb.asc && \
+    wget -q https://dl.influxdata.com/kapacitor/releases/kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb && \
+    gpg --batch --verify kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb.asc kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb && \
+    dpkg -i kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb && \
+    rm -f kapacitor_${KAPACITOR_VERSION}_${ARCH}.deb*
 COPY kapacitor.conf /etc/kapacitor/kapacitor.conf
 
 EXPOSE 9092

@tianon
Copy link
Member

tianon commented Sep 21, 2017

LGTM

warning: insecure protocol git:// detected: git://github.com/influxdata/influxdata-docker
Build test of #3481; 0c85681 (chronograf, influxdb, kapacitor, telegraf):

$ bashbrew build chronograf:1.3
Building bashbrew/cache:9f6b7561d2fb095498e3767aebcad7571855f6545615c10ff6b366cf59cfd1db (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:397c0573e442fc35f21223129c822348af81064932f9f2d2dd44f70bcea93fbb (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:f6aef0efee0d3e3887709a74dcb45f2e102843bdfd5f424d151a12446a2d6f72 (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:db649e1114fc3eb24a4c6c36c438a8c1dd45f60c6a8582bb18e5d7b932e31f91 (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:e89623389f8e6e961f6f755398d902fbe7d828def3a7fc30ac5be9926ba0b9a0 (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:8b17d617d0e360e6d9dae1c9284f4c3047a05fcef7fd647f6496dd43489570c8 (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:a3104dbc2a9fb36fca41909d6267ec6353d895e6d62e41b09c9e606fe6c9f311 (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:7ffa39d6aa348b561516df5133f2f6fb078d6f70009c632917bd577dbbc3a4c2 (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:353cfadeb26bded55f5e8aac55881115b5939e67241bf8d1508c8e3672787e00 (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:264f98bf504d96eb88044d790569807b37d183d067c622a9a60a1f938d6bd033 (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:b530bf131c6e7a1abe721afd33df0b32d4436958373fed81f3dcae9da3c6bd15 (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:e0b91e02fdccedbb90fa26c15a5baefe6a126ef97dc92762cb45b1d32c4cd75b (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:d2dba816a6cb0aab0e4f7ecd3fece27f5765fafc3f10c2a1a9248865191fbda4 (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:af22525a633468e1f561ed0b8e5c866d5bd25f6c13a1e3f2d88a9e9b29d925e0 (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

@tianon tianon merged commit b3ef918 into docker-library:master Sep 21, 2017
@tianon
Copy link
Member

tianon commented Sep 21, 2017

One failure so far:

+ dpkg -i chronograf_1.3.8.1_amd64.deb
dpkg: error processing archive chronograf_1.3.8.1_amd64.deb (--install):
 package architecture (amd64) does not match system (arm64)
Errors were encountered while processing:
 chronograf_1.3.8.1_amd64.deb

(trying to use an amd64 deb file as-is on arm64)

@jsternberg
Copy link
Contributor Author

It looks like I made a mistake and didn't use ARCH on that image. I'll follow up with another PR in a minute.

@jsternberg
Copy link
Contributor Author

jsternberg commented Sep 21, 2017

Fixed in #3482.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants