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

Adding support for RISC-V #44319

Open
advancedwebdeveloper opened this issue Oct 18, 2022 · 7 comments · May be fixed by #44735
Open

Adding support for RISC-V #44319

advancedwebdeveloper opened this issue Oct 18, 2022 · 7 comments · May be fixed by #44735
Labels
area/packaging kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Comments

@advancedwebdeveloper
Copy link

Description

CC @lazyparser

I caught an error, on RISC-V:

$ make all
docker build --build-arg=GO_VERSION -f "Dockerfile" --target=final -t "docker-dev" .
[+] Building 127.9s (10/10) FINISHED
=> [internal] load build definition from Dockerfile 2.4s
=> => transferring dockerfile: 19.30kB 1.4s
=> [internal] load .dockerignore 0.7s
=> => transferring context: 145B 0.4s
=> resolve image config for docker.io/docker/dockerfile:1 11.2s
=> docker-image://docker.io/docker/dockerfile:1@sha256:9ba7531bd80fb0a8 67.8s
=> => resolve docker.io/docker/dockerfile:1@sha256:9ba7531bd80fb0a858632 0.3s
=> => sha256:9ba7531bd80fb0a858632727cf7a112fbfd19b17e94 2.00kB / 2.00kB 0.0s
=> => sha256:5e015bf33c30723c95127c9479cbb1794a59b0e94b7c398 528B / 528B 0.0s
=> => sha256:ff43dfbc6c873cc43ff094ebb07a8844008696f1886 2.37kB / 2.37kB 0.0s
=> => sha256:3d5d8443811725e865cd78c06e40f01466d0cbe9fb 9.58MB / 9.58MB 26.4s
=> => extracting sha256:3d5d8443811725e865cd78c06e40f01466d0cbe9fb5f27e 33.6s
=> [internal] load build definition from Dockerfile 0.0s
=> [internal] load .dockerignore 0.1s
=> ERROR [internal] load metadata for docker.io/library/golang:1.19.2-bu 7.4s
=> ERROR [internal] load metadata for docker.io/library/debian:bullseye 8.4s
=> CANCELED [internal] load metadata for docker.io/djs55/vpnkit:0.5.0 9.6s
=> CANCELED [internal] load metadata for docker.io/djs55/vpnkit:0.5.0 9.1s

[internal] load metadata for docker.io/library/golang:1.19.2-bullseye:



[internal] load metadata for docker.io/library/debian:bullseye:


failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = no match for platform in manifest sha256:80ede0f12980ec4fc580fa651aabff041d46d1255b323fa0b740ecbce9f89256: not found
make: *** [Makefile:220: build] Error 1

I wonder if any people interested on a 64bit RISC-V support

@advancedwebdeveloper advancedwebdeveloper added kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny status/0-triage labels Oct 18, 2022
@crazy-max
Copy link
Member

See PR description about riscv64 support: #43529 (comment)

To add support for riscv64 builds we need crossbuild packages for riscv64 but current golang image with debian bullseye does not support it. Ubuntu 22.04 supports riscv64 but unfortunately drops support for armel arch. Therefore we need a multi base image that will be picked up based on the target platform we want to build.

See also #43553 (comment)

@AkihiroSuda
Copy link
Member

@crazy-max crazy-max linked a pull request Jan 2, 2023 that will close this issue
@luhenry
Copy link

luhenry commented Jun 21, 2023

Hello,

In the context of adoptium/adoptium-support#697, we've run into an issue with running Java on RISC-V inside Docker. The issue boils down to the riscv_flush_icache syscall failing with EPERM leading to executing stale instructions. It is fixed with #43553 on Moby 23 and later.

That issue arises on Ubuntu 22.04 which ships docker.io v20.10. Unfortunately, it is the only build available on RISC-V at the moment. The docker.io package coming from the Ubuntu repositories (on Ubuntu 22.04 and later) is still at 20.10, and the Docker repositories don't support riscv64.

There are then multiple solution I can see:

  1. work with Debian and Ubuntu to backport seccomp: support riscv64 #43553 to 20.10 to all relevant Debian and Ubuntu versions
  2. backport seccomp: support riscv64 #43553 to 20.10
  3. provide builds in the Docker repositories for riscv64

At the moment, without this patch, it's simply not possible to run Java in Docker on any current versions of Ubuntu or Debian on RISC-V out of the box. (Workarounds are to run with seccomp=unconfined or write a custom seccomp profile that copy/paste what's in that patch.)

I'm not fully familiar with the relationship between Moby and Docker so it's not clear to me what would be the best step(s) forward, and I would greatly appreciate your feedback on that!

Thanks for your input.

@AkihiroSuda
Copy link
Member

  1. provide builds in the Docker repositories for riscv64

👍
dpkgs are built here: https://github.com/docker/docker-ce-packaging/blob/b09da57452865f3f7f6ab510a79821f653a5c0a5/common.mk#L13

You also need to wait for:

@crazy-max
Copy link
Member

Also related to #44735

@luhenry
Copy link

luhenry commented Jun 22, 2023

dpkgs are built here: https://github.com/docker/docker-ce-packaging/blob/b09da57452865f3f7f6ab510a79821f653a5c0a5/common.mk#L13

@AkihiroSuda are you suggesting I submit a PR to add riscv64? I'd be happy to do that but I assume it's not that simple?

@ilg-ul
Copy link

ilg-ul commented Aug 23, 2023

Ubuntu 23.04 already provides functional docker packages for RISC-V, but attempts to use the docker specific install procedure fail with:

N: Skipping acquire of configured file 'stable/binary-riscv64/Packages' as repository 'https://download.docker.com/linux/ubuntu lunar InRelease' doesn't support architecture 'riscv64'

since RISC-V is not listed as a supported architecture (for example in https://download.docker.com/linux/ubuntu/dists/lunar/stable/).

Is there anything I can do to help add support for the RISC-V Ubuntu distribution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants