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

support ppc64le architecture #154

Closed
grooverdan opened this issue Mar 19, 2018 · 5 comments
Closed

support ppc64le architecture #154

grooverdan opened this issue Mar 19, 2018 · 5 comments
Labels
Request Request for image modification or feature

Comments

@grooverdan
Copy link
Member

Upstream support ppc64le packages for 10.0+ releases on Jessie on the same repo urls:

https://downloads.mariadb.org/mariadb/repositories/#distro=Debian&distro_release=jessie--jessie&version=10.2

A gosu implementation does exist.

Unfortunately percona's repository and percona-xtrabackup-24 doesn't exist for ppc64le however a docker image without this would still be functional.
Proof of concept:

$ uname -m
ppc64le
$ git diff
diff --git a/10.3/Dockerfile b/10.3/Dockerfile
index 07da03d..9b98c1a 100644
--- a/10.3/Dockerfile
+++ b/10.3/Dockerfile
@@ -4,6 +4,10 @@ FROM debian:jessie
 # add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
 RUN groupadd -r mysql && useradd -r -g mysql mysql

+#
+RUN [ -n "$http_proxy" ] && echo Acquire::http::proxy '"'$http_proxy'";' >> /etc/apt/apt.conf.d/proxy || :
+RUN [ -n "$https_proxy" ] && echo Acquire::https::proxy '"'$https_proxy'";' >> /etc/apt/apt.conf.d/proxy || :
+
 # add gosu for easy step-down from root
 ENV GOSU_VERSION 1.10
 RUN set -ex; \
@@ -65,7 +69,7 @@ RUN set -ex; \
        apt-key list

 # add Percona's repo for xtrabackup (which is useful for Galera)
-RUN echo "deb https://repo.percona.com/apt jessie main" > /etc/apt/sources.list.d/percona.list \
+RUN echo "deb [arch=amd64,i386] https://repo.percona.com/apt jessie main" > /etc/apt/sources.list.d/percona.list \
        && { \
                echo 'Package: *'; \
                echo 'Pin: release o=Percona Development Team'; \
@@ -94,7 +98,6 @@ RUN { \
        && apt-get install -y \
                "mariadb-server=$MARIADB_VERSION" \
 # percona-xtrabackup is installed at the same time so that `mysql-common` is only installed once from just mariadb repos
-               percona-xtrabackup-24 \
                socat \
        && rm -rf /var/lib/apt/lists/* \
 # comment out any "user" entires in the MySQL config ("docker-entrypoint.sh" or "--user" will handle user switching)
$ docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy -f 10.3/Dockerfile  10.3
...
2018-03-19  5:28:05 0 [Note] /usr/sbin/mysqld (mysqld 10.3.5-MariaDB-10.3.5+maria~jessie) starting as process 852 ...
2018-03-19  5:28:05 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-03-19  5:28:05 0 [Note] InnoDB: Uses event mutexes
2018-03-19  5:28:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-03-19  5:28:05 0 [Note] InnoDB: Using Linux native AIO
2018-03-19  5:28:05 0 [Note] InnoDB: Number of pools: 1
2018-03-19  5:28:05 0 [Note] InnoDB: Using POWER8 crc32 instructions
...
Removing intermediate container c899a2389061
 ---> a85eb6a18422
Successfully built a85eb6a18422

$ docker exec -ti d71885600642  /usr/bin/mysql -h"127.0.0.1" -P"3306" -uroot -p"my-very-secret-pw" -e "select @@version"
+------------------------------------+
| @@version                          |
+------------------------------------+
| 10.3.5-MariaDB-10.3.5+maria~jessie |
+------------------------------------+
@grooverdan
Copy link
Member Author

grooverdan commented Mar 20, 2018

Dockerfile compatibility solved in #155

mariadb-10.1+ has mariadb-backup packages (#111) for jessie and stretch on ppc64le and others.

@grooverdan
Copy link
Member Author

Any feedback? From the response in #125 official packages seem to be the requirement to add a supported architecture. PR #155 makes it compatible by removing a minor component for non-x86_64/i386.

@wglambert wglambert added the Request Request for image modification or feature label Apr 25, 2018
@grooverdan
Copy link
Member Author

Added travis linux-ppc64le tests to #155 to show build is ppc64le compatible (without percona-xtrabackup)
https://travis-ci.org/docker-library/mariadb/builds/373285267

@grooverdan
Copy link
Member Author

Mariabackup is installed on linux-ppc64le based on #158 too - https://travis-ci.org/grooverdan/mariadb/builds/373288626

@grooverdan
Copy link
Member Author

closed via #184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Development

Successfully merging a pull request may close this issue.

2 participants