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

Add Multi-architecture support. #4670

Merged
merged 1 commit into from
Aug 6, 2018
Merged

Conversation

odidev
Copy link
Contributor

@odidev odidev commented Aug 2, 2018

This PR has been raised to add support for arm64v8 and is linked with this.

@tianon

This comment has been minimized.

@tianon

This comment has been minimized.

@odidev
Copy link
Contributor Author

odidev commented Aug 3, 2018

@tianon - Oops, it did fail because of older GitCommit:.
I actually didn't interfere with the commit id, which resulted in failure.

Now I have updated the same. 😄

@pierreozoux
Copy link
Contributor

Looks good to me too.
@odidev I didn't try, does it build for you? If yes, all good!

@tianon

This comment has been minimized.

@tianon
Copy link
Member

tianon commented Aug 3, 2018

+ENV KNOWN_VERSION 0.9.9

Shouldn't Tags: 0.9.2 be Tags: 0.9.9 now?

 - Update Tag to 0.9.9

Signed-off-by: Odidev <[email protected]>
@odidev
Copy link
Contributor Author

odidev commented Aug 6, 2018

@tianon - Agree with your comments.
Updated commit to use 0.9.9 tag

@tianon
Copy link
Member

tianon commented Aug 6, 2018

Diff:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 1c190eb..e962ab9 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -1 +1,2 @@
 known:latest @ amd64
+known:latest @ arm64v8
diff --git a/_bashbrew-list b/_bashbrew-list
index 3fa5c5a..4161674 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,4 +1,4 @@
 known:0
 known:0.9
-known:0.9.2
+known:0.9.9
 known:latest
diff --git a/known_latest/Dockerfile b/known_latest/Dockerfile
index 0ba370b..88feaa7 100644
--- a/known_latest/Dockerfile
+++ b/known_latest/Dockerfile
@@ -1,27 +1,32 @@
 FROM php:5.6-fpm
 
-MAINTAINER [email protected]
+LABEL maintainer="[email protected]"
 
-RUN apt-get update && apt-get install -y \
-      bzip2 \
-      libcurl4-openssl-dev \
+RUN apt-get update \
+ && apt-get install -y --no-install-recommends mysql-client \
+ && savedAptMark="$(apt-mark showmanual)" \
+ && apt-get install -y --no-install-recommends \
       libfreetype6-dev \
       libicu-dev \
       libjpeg-dev \
       libmcrypt-dev \
-      libpng12-dev \
-      libpq-dev \
+      libpng-dev \
       libxml2-dev \
-      mysql-client \
-      unzip \
+ && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
+ && docker-php-ext-install exif gd intl mcrypt opcache pdo_mysql zip json xmlrpc \
+# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
+ && apt-mark auto '.*' > /dev/null \
+ && apt-mark manual $savedAptMark \
+ && ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
+    | awk '/=>/ { print $3 }' \
+    | sort -u \
+    | xargs -r dpkg-query -S \
+    | cut -d: -f1 \
+    | sort -u \
+    | xargs -rt apt-mark manual \
+ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
  && rm -rf /var/lib/apt/lists/*
 
-#gpg key from [email protected]
-RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "53DE 5B99 2244 9132 8B92  7516 052D B5AC 742E 3B47"
-
-RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
- && docker-php-ext-install exif gd intl mbstring mcrypt mysql opcache pdo_mysql zip json xmlrpc
-
 # set recommended PHP.ini settings
 # see https://secure.php.net/manual/en/opcache.installation.php
 RUN { \
@@ -34,17 +39,29 @@ RUN { \
 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
 
 # PECL extensions
-RUN pecl install APCu-4.0.10 \
+RUN pecl install APCu-4.0.11 \
  && docker-php-ext-enable apcu
 
-ENV KNOWN_VERSION 0.9.2
+ENV KNOWN_VERSION 0.9.9
 VOLUME /var/www/html
 
-RUN curl -o known.zip -fSL http://assets.withknown.com/releases/known-${KNOWN_VERSION}.zip \
- && curl -o known.zip.sig -fSL http://assets.withknown.com/releases/known-${KNOWN_VERSION}.zip.sig \
- && gpg --batch --verify known.zip.sig known.zip \
- && unzip known.zip -d /usr/src/known/ \
- && rm known.zip*
+RUN fetchDeps=" \
+    gnupg \
+    dirmngr \
+  " \
+ && apt-get update \
+ && apt-get install -y --no-install-recommends $fetchDeps \
+ && curl -o known.tgz -fSL http://assets.withknown.com/releases/known-${KNOWN_VERSION}.tgz \
+ && curl -o known.tgz.sig -fSL http://assets.withknown.com/releases/known-${KNOWN_VERSION}.tgz.sig \
+ && export GNUPGHOME="$(mktemp -d)" \
+#gpg key from [email protected]
+ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "53DE 5B99 2244 9132 8B92 7516 052D B5AC 742E 3B47" \
+ && gpg --batch --verify known.tgz.sig known.tgz \
+ && mkdir /usr/src/known \
+ && tar -xf known.tgz -C /usr/src/known \
+ && rm -r "$GNUPGHOME" known.tgz* \
+ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
+ && rm -rf /var/lib/apt/lists/*
 
 COPY docker-entrypoint.sh /entrypoint.sh
 ENTRYPOINT ["/entrypoint.sh"]

@tianon
Copy link
Member

tianon commented Aug 6, 2018

LGTM

Build test of #4670; b813be9; amd64 (known):

$ bashbrew build known:0.9.9
Building bashbrew/cache:42b4b2996de49ddb258fa570d34c45584e30f5a181d6e536e84fb1fd6d7495e6 (known:0.9.9)
Tagging known:0.9.9
Tagging known:0.9
Tagging known:0
Tagging known:latest

$ test/run.sh known:0.9.9
testing known:0.9.9
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed

Build test of #4670; b813be9; arm64v8 (known):

$ bashbrew build known:0.9.9
Building bashbrew/cache:dbfa4f8a91729796f4d433a0f4b2a4bbdc86ea53a771777a63e9af90e3808dcc (known:0.9.9)
Tagging known:0.9.9
Tagging known:0.9
Tagging known:0
Tagging known:latest

$ test/run.sh known:0.9.9
testing known:0.9.9
	'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 42342fd into docker-library:master Aug 6, 2018
@tianon
Copy link
Member

tianon commented Jun 19, 2019

ping @pierreozoux -- is known still something actively maintained? It appears to only ever have had two update PRs (this one and the one that added it).

@tianon
Copy link
Member

tianon commented Dec 12, 2019

Friendly ping x2 -- we're very near 500 days since the last known image update and are likely to consider adding a generic "unmaintained" deprecation notice soon.

@tianon
Copy link
Member

tianon commented May 15, 2020

We're over 600 days now (and important issues like idno/Known-Docker#11 are not getting a response 😞). I'm likely going to start drafting some deprecation text for the image description soon unless someone from the Known community steps up to actively maintain this image. 😞

@pierreozoux
Copy link
Contributor

Yeah, sorry, not using it anymore myself.. I'll ping people from there.

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.

4 participants