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

arangodb 3.10.0 #13312

Merged
merged 1 commit into from
Oct 12, 2022
Merged

arangodb 3.10.0 #13312

merged 1 commit into from
Oct 12, 2022

Conversation

KVS85
Copy link
Contributor

@KVS85 KVS85 commented Oct 10, 2022

Added ArangoDB 3.10 (3.10.0).

@tianon
Copy link
Member

tianon commented Oct 11, 2022

Unfortunately, maintaining two separate Dockerfiles for such a trivial difference between architectures is not going to be something we can accept (see also https://github.com/docker-library/official-images#multiple-architectures):

--- aarch64/Dockerfile	2022-10-11 09:35:56.222930997 -0700
+++ x86_64/Dockerfile	2022-10-11 09:35:56.222930997 -0700
@@ -2,8 +2,8 @@
 MAINTAINER Frank Celler <info@arangodb.com>
 
 ENV ARANGO_VERSION 3.10.0
-ENV ARANGO_URL https://download.arangodb.com/arangodb310/DEBIAN/arm64
-ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_arm64.deb
+ENV ARANGO_URL https://download.arangodb.com/arangodb310/DEBIAN/amd64
+ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_amd64.deb
 ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARANGO_PACKAGE}
 ENV ARANGO_SIGNATURE_URL ${ARANGO_PACKAGE_URL}.asc
 

However, this should be reasonably straightforward to resolve -- something like this would be acceptable:

diff --git a/alpine/3.10.0/x86_64/Dockerfile b/alpine/3.10.0/x86_64/Dockerfile
index 2a51d61..92eafcf 100644
--- a/alpine/3.10.0/x86_64/Dockerfile
+++ b/alpine/3.10.0/x86_64/Dockerfile
@@ -2,10 +2,6 @@ FROM alpine:3.16
 MAINTAINER Frank Celler <info@arangodb.com>
 
 ENV ARANGO_VERSION 3.10.0
-ENV ARANGO_URL https://download.arangodb.com/arangodb310/DEBIAN/amd64
-ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_amd64.deb
-ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARANGO_PACKAGE}
-ENV ARANGO_SIGNATURE_URL ${ARANGO_PACKAGE_URL}.asc
 
 # see
 #   https://www.arangodb.com/docs/3.10/programs-arangod-server.html#managing-endpoints
@@ -17,6 +13,16 @@ RUN apk add --no-cache gnupg pwgen binutils numactl numactl-tools nodejs yarn &&
     gpg --batch --keyserver keys.openpgp.org --recv-keys CD8CB0F1E0AD5B52E93F41E7EA93F5E56E751E9B && \
     mkdir /docker-entrypoint-initdb.d && \
     cd /tmp                                && \
+    arch="$(apk --print-arch)"             && \
+    case "$arch" in                           \
+        x86_64)  dpkgArch='amd64'          ;; \
+        aarch64) dpkgArch='arm64'          ;; \
+        *) echo >&2 "unsupported: $arch" && exit 1 ;; \
+    esac                                   && \
+    ARANGO_URL="https://download.arangodb.com/arangodb310/DEBIAN/$dpkgArch" && \
+    ARANGO_PACKAGE="arangodb3_${ARANGO_VERSION}-1_${dpkgArch}.deb" && \
+    ARANGO_PACKAGE_URL="${ARANGO_URL}/${ARANGO_PACKAGE}" && \
+    ARANGO_SIGNATURE_URL="${ARANGO_PACKAGE_URL}.asc" && \
     wget ${ARANGO_SIGNATURE_URL}           && \
     wget ${ARANGO_PACKAGE_URL}             && \
     gpg --verify ${ARANGO_PACKAGE}.asc     && \

Another option would be to install dpkg such that you could use dpkg --print-architecture directly:

diff --git a/alpine/3.10.0/x86_64/Dockerfile b/alpine/3.10.0/x86_64/Dockerfile
index 2a51d61..0c21bc2 100644
--- a/alpine/3.10.0/x86_64/Dockerfile
+++ b/alpine/3.10.0/x86_64/Dockerfile
@@ -2,21 +2,22 @@ FROM alpine:3.16
 MAINTAINER Frank Celler <info@arangodb.com>
 
 ENV ARANGO_VERSION 3.10.0
-ENV ARANGO_URL https://download.arangodb.com/arangodb310/DEBIAN/amd64
-ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_amd64.deb
-ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARANGO_PACKAGE}
-ENV ARANGO_SIGNATURE_URL ${ARANGO_PACKAGE_URL}.asc
 
 # see
 #   https://www.arangodb.com/docs/3.10/programs-arangod-server.html#managing-endpoints
 #   https://www.arangodb.com/docs/3.10/programs-arangod-log.html
 
-RUN apk add --no-cache gnupg pwgen binutils numactl numactl-tools nodejs yarn && \
+RUN apk add --no-cache dpkg gnupg pwgen binutils numactl numactl-tools nodejs yarn && \
     yarn global add foxx-cli@2.0.1 && \
     apk del yarn && \
     gpg --batch --keyserver keys.openpgp.org --recv-keys CD8CB0F1E0AD5B52E93F41E7EA93F5E56E751E9B && \
     mkdir /docker-entrypoint-initdb.d && \
     cd /tmp                                && \
+    arch="$(dpkg --print-architecture)"    && \
+    ARANGO_URL="https://download.arangodb.com/arangodb310/DEBIAN/$arch" && \
+    ARANGO_PACKAGE="arangodb3_${ARANGO_VERSION}-1_${arch}.deb" && \
+    ARANGO_PACKAGE_URL="${ARANGO_URL}/${ARANGO_PACKAGE}" && \
+    ARANGO_SIGNATURE_URL="${ARANGO_PACKAGE_URL}.asc" && \
     wget ${ARANGO_SIGNATURE_URL}           && \
     wget ${ARANGO_PACKAGE_URL}             && \
     gpg --verify ${ARANGO_PACKAGE}.asc     && \
@@ -31,7 +32,7 @@ RUN apk add --no-cache gnupg pwgen binutils numactl numactl-tools nodejs yarn &&
     chmod -R 775 /var/lib/arangodb3 /var/lib/arangodb3-apps && \
     rm -f /usr/bin/foxx && \
     rm -f ${ARANGO_PACKAGE}* data.tar.gz && \
-    apk del gnupg
+    apk del dpkg gnupg
 # Note that Openshift runs containers by default with a random UID and GID 0.
 # We need that the database and apps directory are writable for this config.
 

(With this option, you could also use tools like dpkg-deb or even dpkg itself to install the contents of the .deb file instead of mangling it with ar manually.)

Additionally, for this to work you'll need to add Architectures: amd64, arm64v8 to your new entry in the library/arangodb file. 👍

@KVS85
Copy link
Contributor Author

KVS85 commented Oct 12, 2022

@tianon ready for your review. Hopefully it's now acceptable. Thank you for the reply.

@github-actions
Copy link

Diff for c00353a:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index eac783b..9d5c562 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -6,6 +6,11 @@ Tags: 3.8, 3.8.7
 GitCommit: 0e1a717e606a4fd6fa406fdb26bf5cc61486d0e5
 Directory: alpine/3.8.7
 
-Tags: 3.9, 3.9.3, latest
+Tags: 3.9, 3.9.3
 GitCommit: 66deb6fc6518f7d81a2e6087b2397447e240f8c4
 Directory: alpine/3.9.3
+
+Tags: 3.10, 3.10.0, latest
+Architectures: amd64, arm64v8
+GitCommit: 31df6aaffd35f1e221d59cc1802eeb71db058c9d
+Directory: alpine/3.10.0
diff --git a/_bashbrew-list b/_bashbrew-list
index 265dab2..bd79657 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -2,4 +2,6 @@ arangodb:3.8
 arangodb:3.8.7
 arangodb:3.9
 arangodb:3.9.3
+arangodb:3.10
+arangodb:3.10.0
 arangodb:latest
diff --git a/arangodb_latest/Dockerfile b/arangodb_3.9.3/Dockerfile
similarity index 100%
copy from arangodb_latest/Dockerfile
copy to arangodb_3.9.3/Dockerfile
diff --git a/arangodb_3.8.7/docker-entrypoint.sh b/arangodb_3.9.3/docker-entrypoint.sh
similarity index 100%
copy from arangodb_3.8.7/docker-entrypoint.sh
copy to arangodb_3.9.3/docker-entrypoint.sh
diff --git a/arangodb_3.8.7/docker-foxx.sh b/arangodb_3.9.3/docker-foxx.sh
similarity index 100%
copy from arangodb_3.8.7/docker-foxx.sh
copy to arangodb_3.9.3/docker-foxx.sh
diff --git a/arangodb_latest/Dockerfile b/arangodb_latest/Dockerfile
index 4ea1dab..92eafcf 100644
--- a/arangodb_latest/Dockerfile
+++ b/arangodb_latest/Dockerfile
@@ -1,15 +1,11 @@
-FROM alpine:3.14
+FROM alpine:3.16
 MAINTAINER Frank Celler <info@arangodb.com>
 
-ENV ARANGO_VERSION 3.9.3
-ENV ARANGO_URL https://download.arangodb.com/arangodb39/DEBIAN/amd64
-ENV ARANGO_PACKAGE arangodb3_${ARANGO_VERSION}-1_amd64.deb
-ENV ARANGO_PACKAGE_URL ${ARANGO_URL}/${ARANGO_PACKAGE}
-ENV ARANGO_SIGNATURE_URL ${ARANGO_PACKAGE_URL}.asc
+ENV ARANGO_VERSION 3.10.0
 
 # see
-#   https://www.arangodb.com/docs/3.9/programs-arangod-server.html#managing-endpoints
-#   https://www.arangodb.com/docs/3.9/programs-arangod-log.html
+#   https://www.arangodb.com/docs/3.10/programs-arangod-server.html#managing-endpoints
+#   https://www.arangodb.com/docs/3.10/programs-arangod-log.html
 
 RUN apk add --no-cache gnupg pwgen binutils numactl numactl-tools nodejs yarn && \
     yarn global add foxx-cli@2.0.1 && \
@@ -17,6 +13,16 @@ RUN apk add --no-cache gnupg pwgen binutils numactl numactl-tools nodejs yarn &&
     gpg --batch --keyserver keys.openpgp.org --recv-keys CD8CB0F1E0AD5B52E93F41E7EA93F5E56E751E9B && \
     mkdir /docker-entrypoint-initdb.d && \
     cd /tmp                                && \
+    arch="$(apk --print-arch)"             && \
+    case "$arch" in                           \
+        x86_64)  dpkgArch='amd64'          ;; \
+        aarch64) dpkgArch='arm64'          ;; \
+        *) echo >&2 "unsupported: $arch" && exit 1 ;; \
+    esac                                   && \
+    ARANGO_URL="https://download.arangodb.com/arangodb310/DEBIAN/$dpkgArch" && \
+    ARANGO_PACKAGE="arangodb3_${ARANGO_VERSION}-1_${dpkgArch}.deb" && \
+    ARANGO_PACKAGE_URL="${ARANGO_URL}/${ARANGO_PACKAGE}" && \
+    ARANGO_SIGNATURE_URL="${ARANGO_PACKAGE_URL}.asc" && \
     wget ${ARANGO_SIGNATURE_URL}           && \
     wget ${ARANGO_PACKAGE_URL}             && \
     gpg --verify ${ARANGO_PACKAGE}.asc     && \

Relevant Maintainers:

@tianon tianon merged commit 57e41bf into docker-library:master Oct 12, 2022
@tianon
Copy link
Member

tianon commented Oct 12, 2022

Looks good, thanks!

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.

2 participants