batonogov/docker-pyinstaller

Multi-platform build

Closed this issue · 5 comments

Is your feature request related to a problem? Please describe.
I would like to build my executables for linux: amd64, i386, arm32, arm64

Describe the solution you'd like
Implementation of those features into the GitHub Actions

Hi.

I tried i386 and arm32 builds locally and got the following results.

There are no problems with linux/i386 and that's very cool!

podman build -f Dockerfile-py3-linux --platform=linux/i386 .
STEP 1/11: FROM python:3.12.1
STEP 2/11: SHELL ["/bin/bash", "-i", "-c"]
--> Using cache 3143ba9470e1b6b898a3b296adceb459bc329e9eea4f1c1f210863d4ecac6f37
--> 3143ba9470e1
STEP 3/11: LABEL maintainer="f.batonogov@yandex.ru"
--> Using cache cd62013a5f5c46ffe6e5c316707d13a61a2031051b96b853b66e388f5e693b65
-->cd62013a5f5c
STEP 4/11: ARG PYINSTALLER_VERSION=6.3.0
--> Using cache 3b7ad5cf2f3fe7a566fa113004844cb9a13bce37e3dfc1a3880f870a346be778
--> 3b7ad5cf2f3f
STEP 5/11: ENV PYPI_URL=https://pypi.python.org/
--> Using cache 3ae345771c37106993cb3bbf1aa5905cd087429741a2181eb2388b1f372c0291
-->3ae345771c37
STEP 6/11: ENV PYPI_INDEX_URL=https://pypi.python.org/simple
--> Using cache b27e96e6ea12321e449b96a321f2c3799703eb3601f779f67820dbeb9c682d94
-->b27e96e6ea12
STEP 7/11: COPY entrypoint-linux.sh /entrypoint.sh
--> Using cache 27937def919349c62b151399ea2b9f8240f009f0519999000a2b764369480246
-->27937def9193
STEP 8/11: RUN pip3 install pyinstaller==$PYINSTALLER_VERSION && chmod +x /entrypoint.sh
--> Using cache 449bbed3fdd9f8e577c7ceae3f0454226c68f9b5021c8dac61fe98142ffb5995
--> 449bbed3fdd9
STEP 9/11: VOLUME /src/
--> Using cache 7c80658af1529ac4d49a45c97da029aeb290cb87ca243fc0e62868f069764a81
--> 7c80658af152
STEP 10/11: WORKDIR /src/
--> Using cache 267e317c2b14b270616bbf4313cba4f1eea03425317fbd483b42841605c6f7fb
--> 267e317c2b14
STEP 11/11: ENTRYPOINT ["/entrypoint.sh"]
--> Using cache acafffd126640d6ac17b4fab02a7a925c083fc9d9be6bbcae19436e4bd488a11
-->acaffd12664
acafffd126640d6ac17b4fab02a7a925c083fc9d9be6bbcae19436e4bd488a11

But there are problems with linux/arm32:

podman build -f Dockerfile-py3-linux --platform=linux/arm32 .
STEP 1/11: FROM python:3.12.1
Resolved "python" as an alias (/etc/containers/registries.conf.d/000-shortnames.conf)
Trying to pull docker.io/library/python:3.12.1...
Error: creating build container: choosing an image from manifest list docker://python:3.12.1: no image found in manifest list for architecture arm32, variant "", OS linux

I looked at the list of supported architectures and came to the conclusion what the final list of architectures might look like So:

  • linux/386
  • linux/amd64
  • linux/arm/v5
  • linux/arm/v7
  • linux/arm64/v8
  • linux/ppc64le
  • linux/s390x

Please update the list of architectures and I will accept your pull request.

Hello,
I added every linux architecture you mentioned.

Regards.

Closing this as complete, everything is done, new images are being built.