Failed to build arm image
woolter opened this issue · 1 comments
woolter commented
I'm using oci-build-task to create images, but not only linux/amd64, when I try to use any of these:
- IMAGE_PLATFORM: linux/arm/v6
- IMAGE_PLATFORM: linux/arm/v7
- IMAGE_PLATFORM: linux/arm64
I get the following error
#8 18.15 Traceback (most recent call last):
#8 18.15 File "/usr/local/bin/pip", line 8, in <module>
#8 18.16 sys.exit(main())
#8 18.16 File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 70, in main
#8 18.16 return command.main(cmd_args)
#8 18.16 File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 98, in main
#8 18.16 return self._main(args)
#8 18.16 File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 214, in _main
#8 18.16 self.handle_pip_version_check(options)
#8 18.16 File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 143, in handle_pip_version_check
#8 18.16 session = self._build_session(
#8 18.16 File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 88, in _build_session
#8 18.16 session = PipSession(
#8 18.16 File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 289, in __init__
#8 18.17 self.headers["User-Agent"] = user_agent()
#8 18.17 File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/session.py", line 132, in user_agent
#8 18.17 linux_distribution = distro.linux_distribution() # type: ignore
#8 18.17 File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 125, in linux_distribution
#8 18.17 return _distro.linux_distribution(full_distribution_name)
#8 18.17 File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 681, in linux_distribution
#8 18.17 self.version(),
#8 18.17 File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 741, in version
#8 18.17 self.lsb_release_attr('release'),
#8 18.17 File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
#8 18.17 return self._lsb_release_info.get(attribute, '')
#8 18.17 File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 556, in __get__
#8 18.18 ret = obj.__dict__[self._fname] = self._f(obj)
#8 18.18 File "/usr/local/lib/python3.9/site-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
#8 18.18 stdout = subprocess.check_output(cmd, stderr=devnull)
#8 18.18 File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
#8 18.18 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
#8 18.18 File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
#8 18.18 raise CalledProcessError(retcode, process.args,
#8 18.18 subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
#8 ERROR: executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c pip install --no-cache-dir -r requirements.txt]: exit code: 1
------
> [4/4] RUN pip install --no-cache-dir -r requirements.txt:
------
Dockerfile:7
--------------------
5 | COPY . .
6 |
7 | >>> RUN pip install --no-cache-dir -r requirements.txt
8 |
9 | ENTRYPOINT python ./helloWorld.py
--------------------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/dev/.buildkit_qemu_emulator /bin/sh -c pip install --no-cache-dir -r requirements.txt]: exit code: 1
FATA[0055] failed to build: build: exit status 1
FATA[0055] failed to run task: exit status 1
In this repo you will be able to find an example repository (Dockerfile, helloWorld.py and requirement.txt) that I'm using and the pipeline to create.
https://github.com/woolter/test-oci-build-task
The code related with the push is commented as in this moment I'm not able to build the image
cunnie commented
Similar but different: setting IMAGE_PLATFORM
to linux/arm64
built the linux/amd64
(x86_64) variant.
#5 [2/6] RUN dnf install -y iproute bind-utils neovim
#5 sha256:91d895079f3865ddb70de5a790cbf5518f1554e0c4964b2f43bf52a8593d9671
#5 5.204 Fedora 35 - x86_64 12 MB/s | 61 MB 00:04