CoRfr / spex-3gpp

A WebService to deliver 3GPP specifications.
GNU General Public License v3.0
35 stars 17 forks source link

Incompatible with Apple M1 (arm64/armv8) #18

Open tecandrew opened 3 years ago

tecandrew commented 3 years ago

Docker released a preview version for Apple M1 platforms. The public instance (http://spex.cor-net.org) is down at the time of writing this, so I attempted to spin up a local instance. It could be a Docker/Apple M1 issue, but jotting it down here.

Logs

 ~/ docker run --name spex-mysql --platform linux/amd64 --network spex-net -e MYSQL_ROOT_PASSWORD=spex -d mysql:latest
 # OK

 ~/ docker pull corfr/spex --platform linux/amd64
# OK

 ~/ docker run -it --network spex-net --rm mysql mysql -h spex-mysql -u root -p
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.25 MySQL Community Server - GPL

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE spex;
Query OK, 1 row affected (0.04 sec)

mysql> exit
Bye

 ~/ docker run --name spex --network spex-net -e MYSQL_ENV_DB_NAME=spex -e MYSQL_ENV_DB_USER=root -e MYSQL_ENV_DB_PASS=spex -e MYSQL_PORT_3306_TCP_ADDR=spex-mysql -v spex-storage:/home/app/webapp/specs -p 3000:80 corfr/spex
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/10_syslog-ng.init...
May 13 18:44:48 7d24b89feefa syslog-ng[30]: syslog-ng starting up; version='3.13.2'
*** Running /etc/my_init.d/30_presetup_nginx.sh...
*** Running /etc/my_init.d/webapp.sh...
`` is not a directory.
Bundler will use `/tmp/bundler20210513-90-ha5sda90' as your home directory temporarily.
/usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/spec_set.rb:88:in `block in materialize': Could not find concurrent-ruby-1.1.5 in any of the sources (Bundler::GemNotFound)
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/spec_set.rb:82:in `map!'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/spec_set.rb:82:in `materialize'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/definition.rb:170:in `specs'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/definition.rb:240:in `specs_for'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/definition.rb:222:in `requested_specs'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/runtime.rb:91:in `block in definition_method'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/runtime.rb:20:in `setup'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler.rb:148:in `setup'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/setup.rb:20:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/ui/shell.rb:136:in `with_level'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/ui/shell.rb:88:in `silence'
    from /usr/local/rvm/gems/ruby-2.6.6/gems/bundler-2.2.9/lib/bundler/setup.rb:20:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /usr/local/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
*** /etc/my_init.d/webapp.sh failed with status 1

*** Killing all processes...
May 13 18:44:54 7d24b89feefa syslog-ng[30]: syslog-ng shutting down; version='3.13.2'
tecandrew commented 3 years ago

Manual rebuild log:

 ~/workspaces/trabus/spex/spex-3gpp/ [dependabot/bundler/rack-2.2.3*] docker-compose up -d
Docker Compose is now in the Docker CLI, try `docker compose up`

Pulling db (mysql:latest)...
latest: Pulling from library/mysql
69692152171a: Pull complete
1651b0be3df3: Pull complete
951da7386bc8: Pull complete
0f86c95aa242: Pull complete
37ba2d8bd4fe: Pull complete
6d278bb05e94: Pull complete
497efbd93a3e: Pull complete
f7fddf10c2c2: Pull complete
16415d159dfb: Pull complete
0e530ffc6b73: Pull complete
b0a4a1a77178: Pull complete
cd90f92aa9ef: Pull complete
Digest: sha256:d50098d7fcb25b1fcb24e2d3247cae3fc55815d64fec640dc395840f8fa80969
Status: Downloaded newer image for mysql:latest
Building spex
[+] Building 186.7s (6/21)
[+] Building 186.9s (6/21)
[+] Building 540.5s (7/21)
[+] Building 540.7s (7/21)
[+] Building 540.8s (7/21)
[+] Building 541.0s (7/21)
[+] Building 1587.6s (7/21)
[+] Building 1587.8s (7/21)
[+] Building 1587.9s (7/21)
[+] Building 1588.1s (7/21)
[+] Building 1588.2s (7/21)
[+] Building 1588.4s (7/21)
[+] Building 1588.5s (7/21)
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
[+] Building 1588.7s (7/21)
[+] Building 1588.8s (7/21)
[+] Building 1590.7s (7/21)
[+] Building 1591.0s (7/21)
[+] Building 1591.1s (7/21)
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
[+] Building 1591.4s (7/21)
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
[+] Building 2084.4s (7/21)
[+] Building 2264.7s (7/21)
[+] Building 2264.9s (7/21)
[+] Building 2265.0s (7/21)
[+] Building 2265.2s (7/21)
[+] Building 2834.6s (20/21)
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
 => => transferring dockerfile: 3.01kB                                                                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => [internal] load metadata for docker.io/phusion/passenger-ruby26:1.0.11                                                                                                                             1.9s
 => [auth] phusion/passenger-ruby26:pull token for registry-1.docker.io                                                                                                                                0.0s
 => [internal] load build context                                                                                                                                                                      0.1s
 => => transferring context: 1.78MB                                                                                                                                                                    0.1s
 => CACHED [ 1/16] FROM docker.io/phusion/passenger-ruby26:1.0.11@sha256:2e1f723ca234b927c359b830f3340e037837fa04cacfe4a3ca5f129dbf8a8753                                                              0.0s
 => => resolve docker.io/phusion/passenger-ruby26:1.0.11@sha256:2e1f723ca234b927c359b830f3340e037837fa04cacfe4a3ca5f129dbf8a8753                                                                       0.0s
 => [ 2/16] RUN sed -i 's/# deb-src/deb-src/g' /etc/apt/sources.list &&     apt-get update &&     apt-get build-dep -yy libpoppler73 &&     apt-get install -yy wget git xz-utils libpango1.0-dev m  288.6s
 => [ 3/16] RUN cd /tmp &&     git clone --depth=1 git://git.freedesktop.org/git/poppler/poppler -b poppler-0.81.0 &&     cd poppler &&     mkdir build &&     cd build &&     cmake -DCMAKE_BUILD  2353.2s
 => [ 4/16] RUN cd /tmp &&     git clone --depth=1 https://github.com/pdf2htmlEX/pdf2htmlEX.git -b v0.18.7-poppler-0.81.0 &&     cd pdf2htmlEX &&     export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/  144.0s
 => [ 5/16] RUN rm -f /etc/service/nginx/down                                                                                                                                                          0.2s
 => [ 6/16] RUN apt-get update &&     apt-get install -V -yy libpoppler-glib-dev libgirepository1.0-dev &&     gem install bundler                                                                    28.5s
 => [ 7/16] ADD . /home/app/webapp                                                                                                                                                                     0.1s
 => [ 8/16] RUN rm -f /etc/nginx/sites-enabled/default                                                                                                                                                 0.2s
 => [ 9/16] RUN mv /home/app/webapp/docker/webapp.conf /etc/nginx/sites-enabled/webapp.conf                                                                                                            0.2s
 => [10/16] RUN mv /home/app/webapp/docker/database.yml /home/app/webapp/config/database.yml                                                                                                           0.2s
 => [11/16] RUN mkdir -p /etc/my_init.d                                                                                                                                                                0.2s
 => [12/16] RUN mv /home/app/webapp/docker/webapp.sh /etc/my_init.d/webapp.sh                                                                                                                          0.2s
 => [13/16] RUN chown -R app /home/app/webapp                                                                                                                                                          0.3s
 => [14/16] RUN cp /home/app/webapp/docker/sync_job.sh /etc/cron.weekly/sync_job &&     chown root:root /etc/cron.weekly/sync_job &&     chmod 755 /etc/cron.weekly/sync_job                           0.3s
 => ERROR [15/16] RUN cd /home/app/webapp &&     bundle config set path 'vendor/bundle' &&     bundle install --jobs 4                                                                                16.4s
------
 > [15/16] RUN cd /home/app/webapp &&     bundle config set path 'vendor/bundle' &&     bundle install --jobs 4:
#20 10.87 Fetching gem metadata from https://rubygems.org/
#20 10.89 Fetching gem metadata from https://rubygems.org/............
#20 16.37 Your bundle is locked to mimemagic (0.3.3) from rubygems repository
#20 16.37 https://rubygems.org/ or installed locally, but that version can no longer be
#20 16.37 found in that source. That means the author of mimemagic (0.3.3) has removed it.
#20 16.37 You'll need to update your bundle to a version other than mimemagic (0.3.3) that
#20 16.37 hasn't been removed in order to install.
------
executor failed running [/bin/sh -c cd /home/app/webapp &&     bundle config set path 'vendor/bundle' &&     bundle install --jobs 4]: exit code: 7
ERROR: Service 'spex' failed to build : Build failed