openjournals / inara

Tools to create JOSS/JOSE publishing artifacts
MIT License
27 stars 17 forks source link

Can't build dockerfile on M3 mac #80

Closed cthoyt closed 3 weeks ago

cthoyt commented 3 weeks ago

I'm on a M3 mac. I'm trying to build my own version of the Inara image using docker build -t inara:edgier . on my M3 mac. I'm getting the following error:

 - InvalidBaseImagePlatform: Base image pandoc/latex:3.2.0-alpine was pulled with platform "linux/amd64", expected "linux/arm64" for current build (line 1)
Dockerfile:6

This might be a fully upstream issue for pandoc/latex:3.2.0-alpine, which doesn't appear to be available for multiple architectures. Either way, this makes it very difficult (if not impossible) to reproduce the testing pipeline, which produces an opaque binary PDF that doesn't have a meaningful diff. https://github.com/openjournals/inara/issues/81 could be an alternate solution that doesn't require getting in the guts of pandoc's devops

Full error message ``` [+] Building 54.1s (8/13) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.22kB 0.0s => [internal] load metadata for docker.io/pandoc/latex:3.2.0-alpine 1.2s => [auth] pandoc/latex:pull token for registry-1.docker.io 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 87B 0.0s => [1/8] FROM docker.io/pandoc/latex:3.2.0-alpine@sha256:5214a77b4297e95cd139e7ff003dad536d5cf8d0f287b519bfc923f9602aa27d 0.0s => [internal] load build context 0.0s => => transferring context: 60.92kB 0.0s => CACHED [2/8] RUN apk add --no-cache ttf-hack 0.0s => ERROR [3/8] RUN tlmgr update --self && tlmgr install algorithmicx algorithms collection-context draftwatermark environ fontsetup hyperxmp latexmk lineno 52.8s ------ > [3/8] RUN tlmgr update --self && tlmgr install algorithmicx algorithms collection-context draftwatermark environ fontsetup hyperxmp latexmk lineno marginnote newcomputermodern orcidlink preprint seqsplit tcolorbox titlesec trimspaces xkeyval xstring: 4.931 tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (verified) 4.931 tlmgr: saving backups to /opt/texlive/texdir/tlpkg/backups 4.931 tlmgr: no self-updates for tlmgr available 6.761 tlmgr: package repository https://ctan.mirrors.hoobly.com/systems/texlive/tlnet (verified) 6.761 tlmgr install: package already present: latexmk 6.761 [1/54, ??:??/??:??] install: algorithmicx [8k] 7.286 [2/54, 00:01/54:41] install: algorithms [4k] 7.807 [3/54, 00:01/37:43] install: context.x86_64-linuxmusl [969k] 9.182 [4/54, 00:03/01:15] install: context [8842k] 12.08 [5/54, 00:06/00:15] install: context-calendar-examples [10k] 12.60 [6/54, 00:06/00:15] install: context-chat [3k] 13.13 [7/54, 00:07/00:17] install: context-collating-marks [3k] 13.66 [8/54, 00:07/00:17] install: context-companion-fonts [112k] 14.58 [9/54, 00:08/00:19] install: context-cyrillicnumbers [8k] 15.10 [10/54, 00:09/00:22] install: context-filter [7k] 15.62 [11/54, 00:09/00:22] install: context-gnuplot [19k] 16.27 [12/54, 00:10/00:24] install: context-handlecsv [16k] 16.92 [13/54, 00:11/00:27] install: context-legacy.x86_64-linuxmusl [1k] 17.44 [14/54, 00:11/00:27] install: context-legacy [2404k] 19.15 [15/54, 00:13/00:25] install: context-letter [21k] 19.79 [16/54, 00:13/00:25] install: context-mathsets [5k] 20.31 [17/54, 00:14/00:27] install: context-notes-zh-cn [1k] 20.83 [18/54, 00:14/00:27] install: context-pocketdiary [25k] 21.49 [19/54, 00:15/00:29] install: context-simpleslides [29k] 22.14 [20/54, 00:16/00:31] install: context-squares [4k] 22.66 [21/54, 00:16/00:31] install: context-sudoku [8k] 23.18 [22/54, 00:17/00:33] install: context-texlive.x86_64-linuxmusl [1k] 23.70 [23/54, 00:17/00:33] install: context-texlive [2k] 24.21 [24/54, 00:18/00:35] install: context-transliterator [19k] 24.87 [25/54, 00:19/00:37] install: context-typescripts [8k] 25.39 [26/54, 00:19/00:37] install: context-vim [10k] 25.91 [27/54, 00:20/00:39] install: context-visualcounter [4k] 26.44 [28/54, 00:20/00:39] install: draftwatermark [3k] 26.96 [29/54, 00:21/00:41] install: environ [2k] 27.47 [30/54, 00:21/00:41] install: fontsetup [8k] 27.99 [31/54, 00:22/00:43] install: hyperxmp.x86_64-linuxmusl [1k] 28.51 [32/54, 00:22/00:43] install: hyperxmp [15k] 29.16 [33/54, 00:23/00:45] install: jmn [40k] 29.94 [34/54, 00:24/00:47] install: lineno [62k] 30.74 [35/54, 00:24/00:46] install: luajittex.x86_64-linuxmusl [3969k] 32.66 [36/54, 00:26/00:38] install: luajittex [1k] 33.18 [37/54, 00:27/00:40] install: manfnt-font [26k] 33.84 [38/54, 00:27/00:40] install: marginnote [4k] 34.36 [39/54, 00:28/00:41] install: metapost.x86_64-linuxmusl [954k] 35.74 [40/54, 00:29/00:40] install: metapost [73k] 36.52 [41/54, 00:30/00:41] install: mflogo-font [18k] 37.17 [42/54, 00:31/00:43] install: newcomputermodern [6566k] 39.55 [43/54, 00:33/00:33] install: orcidlink [2k] 40.07 [44/54, 00:34/00:34] install: preprint [7k] 40.59 [45/54, 00:34/00:34] install: seqsplit [2k] 41.11 [46/54, 00:35/00:35] install: stmaryrd [163k] 42.04 [47/54, 00:36/00:36] install: tcolorbox [229k] 43.09 [48/54, 00:37/00:37] install: texlive-scripts-extra.x86_64-linuxmusl [1k] 43.60 [49/54, 00:37/00:37] install: texlive-scripts-extra [22k] 44.25 [50/54, 00:38/00:38] install: titlesec [20k] 44.90 [51/54, 00:39/00:39] install: trimspaces [1k] 45.43 [52/54, 00:39/00:39] install: xkeyval [9k] 45.94 [53/54, 00:40/00:40] install: xstring [12k] 46.59 [54/54, 00:40/00:40] install: collection-context [1k] 47.10 running mktexlsr ... 47.39 done running mktexlsr. 47.44 running updmap-sys ... 47.92 done running updmap-sys. 47.92 regenerating fmtutil.cnf in /opt/texlive/texdir/texmf-dist 47.92 running fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK ... 48.17 tlmgr: fmtutil-sys --byengine luajittex --no-error-if-no-format --no-error-if-no-engine=luametatex,luajithbtex,luajittex,mfluajit --status-file=/tmp/rdpBNsgRnE/sqxfrNlIgK failed (status 1), output: 48.17 fmtutil: fmtutil is using the following fmtutil.cnf files (in precedence order): 48.17 fmtutil: /opt/texlive/texdir/texmf-dist/web2c/fmtutil.cnf 48.17 fmtutil: fmtutil is using the following fmtutil.cnf file for writing changes: 48.17 fmtutil: /opt/texlive/texdir/texmf-config/web2c/fmtutil.cnf 48.17 fmtutil [INFO]: writing formats under /opt/texlive/texdir/texmf-var/web2c 48.17 fmtutil [INFO]: --- remaking luajittex with luajittex 48.17 fmtutil: running `luajittex -ini -jobname=luajittex -progname=luajittex luatex.ini' ... 48.17 Can't create the Lua state. 48.17 fmtutil [ERROR]: running `luajittex -ini -jobname=luajittex -progname=luajittex luatex.ini >> RUN tlmgr update --self && tlmgr install \ 7 | >>> algorithmicx \ 8 | >>> algorithms \ 9 | >>> collection-context \ 10 | >>> draftwatermark \ 11 | >>> environ \ 12 | >>> fontsetup \ 13 | >>> hyperxmp \ 14 | >>> latexmk \ 15 | >>> lineno \ 16 | >>> marginnote \ 17 | >>> newcomputermodern \ 18 | >>> orcidlink \ 19 | >>> preprint \ 20 | >>> seqsplit \ 21 | >>> tcolorbox \ 22 | >>> titlesec \ 23 | >>> trimspaces \ 24 | >>> xkeyval \ 25 | >>> xstring 26 | -------------------- ERROR: failed to solve: process "/bin/sh -c tlmgr update --self && tlmgr install algorithmicx algorithms collection-context draftwatermark environ fontsetup hyperxmp latexmk lineno marginnote newcomputermodern orcidlink preprint seqsplit tcolorbox titlesec trimspaces xkeyval xstring" did not complete successfully: exit code: 2 View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/jkaqwsic56iozyxf8822uhg8v ```
tarleb commented 3 weeks ago

See also #30. Closing in favor of that issue.