Enable riscv64 default (#4108)

* include riscv64 in target architectures

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* add riscv64 to explicit packages

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* cadvisor update to v0.51.0 and support for riscv64

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* update tools based on latest

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* updated example dependencies of tools

Signed-off-by: Avi Deitcher <avi@deitcher.net>

* bump all test cases and example alpine:3.19 to alpine:3.21

Signed-off-by: Avi Deitcher <avi@deitcher.net>

---------

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2025-02-23 13:37:06 +02:00
committed by GitHub
parent 18e7eea86f
commit 2053d17564
39 changed files with 51 additions and 30 deletions

View File

@@ -46,7 +46,7 @@ services:
- /etc/docker/daemon.json:/etc/docker/daemon.json - /etc/docker/daemon.json:/etc/docker/daemon.json
command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"] command: ["/usr/local/bin/docker-init", "/usr/local/bin/dockerd"]
- name: cadvisor - name: cadvisor
image: linuxkit/cadvisor:b4a75f3e296ebbeac3a008eee74f8dd2305e595e image: linuxkit/cadvisor:8dfefe0f9593ba21aca5d08fadac16de907d470d
files: files:
- path: var/lib/docker - path: var/lib/docker
directory: true directory: true

View File

@@ -75,7 +75,7 @@ services:
command: ["/vpnkit-forwarder", "-vsockPort", "62373"] command: ["/vpnkit-forwarder", "-vsockPort", "62373"]
# Monitor for image deletes and invoke a TRIM on the container filesystem # Monitor for image deletes and invoke a TRIM on the container filesystem
- name: trim-after-delete - name: trim-after-delete
image: linuxkit/trim-after-delete:7d183e3da081e1c6cd08392f27630fafe069654d image: linuxkit/trim-after-delete:fe73247abd4ab7584a75e95083543af97fe90d4d
# When the host resumes from sleep, force a clock resync # When the host resumes from sleep, force a clock resync
- name: host-timesync-daemon - name: host-timesync-daemon
image: linuxkit/host-timesync-daemon:548bfe9d35c930ee42d6c0485bb4bf25d2729bad image: linuxkit/host-timesync-daemon:548bfe9d35c930ee42d6c0485bb4bf25d2729bad

View File

@@ -7,7 +7,7 @@ init:
- linuxkit/runc:667e7ea2c426a2460ca21e3da065a57dbb3369c9 - linuxkit/runc:667e7ea2c426a2460ca21e3da065a57dbb3369c9
- linuxkit/containerd:0854538eb4dedbb45521357633ccb69eef123f54 - linuxkit/containerd:0854538eb4dedbb45521357633ccb69eef123f54
- linuxkit/ca-certificates:7b32a26ca9c275d3ef32b11fe2a83dbd2aee2fdb - linuxkit/ca-certificates:7b32a26ca9c275d3ef32b11fe2a83dbd2aee2fdb
- linuxkit/firmware:d8d2cc5258da630d5b858ebe1fc96886b9281e9e - linuxkit/firmware:bfc7802f909c4b760de5dd2bc02a7f52e86b78f7
onboot: onboot:
- name: rngd1 - name: rngd1
image: linuxkit/rngd:1a18f2149e42a0a1cb9e7d37608a494342c26032 image: linuxkit/rngd:1a18f2149e42a0a1cb9e7d37608a494342c26032

View File

@@ -7,7 +7,7 @@ init:
- linuxkit/runc:667e7ea2c426a2460ca21e3da065a57dbb3369c9 - linuxkit/runc:667e7ea2c426a2460ca21e3da065a57dbb3369c9
- linuxkit/containerd:0854538eb4dedbb45521357633ccb69eef123f54 - linuxkit/containerd:0854538eb4dedbb45521357633ccb69eef123f54
- linuxkit/ca-certificates:7b32a26ca9c275d3ef32b11fe2a83dbd2aee2fdb - linuxkit/ca-certificates:7b32a26ca9c275d3ef32b11fe2a83dbd2aee2fdb
- linuxkit/firmware:d8d2cc5258da630d5b858ebe1fc96886b9281e9e - linuxkit/firmware:bfc7802f909c4b760de5dd2bc02a7f52e86b78f7
onboot: onboot:
- name: rngd1 - name: rngd1
image: linuxkit/rngd:1a18f2149e42a0a1cb9e7d37608a494342c26032 image: linuxkit/rngd:1a18f2149e42a0a1cb9e7d37608a494342c26032

View File

@@ -39,7 +39,7 @@ services:
volumes: volumes:
- name: blank # blank volume - name: blank # blank volume
- name: alpine # populated volume - name: alpine # populated volume
image: alpine:3.19 image: alpine:3.21
files: files:
- path: etc/linuxkit-config - path: etc/linuxkit-config
metadata: yaml metadata: yaml

View File

@@ -7,7 +7,7 @@ RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
ENV GOPATH=/go PATH=$PATH:/go/bin ENV GOPATH=/go PATH=$PATH:/go/bin
ENV GITBASE=github.com/google ENV GITBASE=github.com/google
ENV GITREPO=github.com/google/cadvisor ENV GITREPO=github.com/google/cadvisor
ENV COMMIT=v0.36.0 ENV COMMIT=v0.51.0
ADD /static.patch /tmp/ ADD /static.patch /tmp/
@@ -18,7 +18,7 @@ RUN mkdir -p /go/src/${GITBASE} \
&& git checkout ${COMMIT} \ && git checkout ${COMMIT} \
&& patch -p1 build/build.sh </tmp/static.patch \ && patch -p1 build/build.sh </tmp/static.patch \
&& make build \ && make build \
&& mv cadvisor /usr/bin/ && mv _output/cadvisor /usr/bin/
FROM linuxkit/alpine:35b33c6b03c40e51046c3b053dd131a68a26c37a AS mirror FROM linuxkit/alpine:35b33c6b03c40e51046c3b053dd131a68a26c37a AS mirror

View File

@@ -3,6 +3,7 @@ network: true
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64
config: config:
pid: host pid: host
binds: binds:

View File

@@ -1,6 +1,6 @@
--- build/build.sh.orig 2017-11-16 16:29:18.281342577 +0000 --- build/build.sh.orig 2017-11-16 16:29:18.281342577 +0000
+++ build/build.sh 2017-11-16 16:29:55.534787421 +0000 +++ build/build.sh 2017-11-16 16:29:55.534787421 +0000
@@ -44,6 +44,7 @@ @@ -47,6 +47,7 @@
-X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE} -X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE}
-X ${repo_path}/version.GoVersion${ldseparator}${go_version}" -X ${repo_path}/version.GoVersion${ldseparator}${go_version}"

View File

@@ -3,3 +3,4 @@ network: true
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -3,3 +3,5 @@ network: true
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -2,6 +2,7 @@ image: trim-after-delete
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64
config: config:
binds: binds:
- /var/run:/var/run - /var/run:/var/run

View File

@@ -17,7 +17,7 @@ import (
// If remoteName is empty, it is the same as name. // If remoteName is empty, it is the same as name.
// If withArchSpecificTags is true, it will push all arch-specific images in the index, each as // If withArchSpecificTags is true, it will push all arch-specific images in the index, each as
// their own tag with the same name as the index, but with the architecture appended, e.g. // their own tag with the same name as the index, but with the architecture appended, e.g.
// image:foo will have image:foo-amd64, image:foo-arm64, etc. // image:foo will have image:foo-amd64, image:foo-arm64, image:foo-riscv64, etc.
func (p *Provider) Push(name, remoteName string, withArchSpecificTags, override bool) error { func (p *Provider) Push(name, remoteName string, withArchSpecificTags, override bool) error {
var ( var (
err error err error

View File

@@ -5,9 +5,9 @@
raw-bios: linuxkit/mkimage-raw-bios:a11bbe671863a75c68c58e9454d3246ab406567c raw-bios: linuxkit/mkimage-raw-bios:a11bbe671863a75c68c58e9454d3246ab406567c
raw-efi: linuxkit/mkimage-raw-efi:60415b45ea87afd47bb61ef5409b1320882d7e56 raw-efi: linuxkit/mkimage-raw-efi:60415b45ea87afd47bb61ef5409b1320882d7e56
squashfs: linuxkit/mkimage-squashfs:3433e24dbecc28d1b70469bc36d91c152355841c squashfs: linuxkit/mkimage-squashfs:3433e24dbecc28d1b70469bc36d91c152355841c
gcp: linuxkit/mkimage-gcp:035c2c2b4b958060c0b6bdd41d9cbc886a335098 gcp: linuxkit/mkimage-gcp:7f220881aed6336708b62afea9820e436b573cea
qcow2-efi: linuxkit/mkimage-qcow2-efi:203809755424fb601f63700f13f17dc65cef69b5 qcow2-efi: linuxkit/mkimage-qcow2-efi:203809755424fb601f63700f13f17dc65cef69b5
vhd: linuxkit/mkimage-vhd:91bcc7a6475f46a3d5d84cf6161f07c583dd9c21 vhd: linuxkit/mkimage-vhd:c6f7696575081986bdda9a6b48ead70498e2aeee
dynamic-vhd: linuxkit/mkimage-dynamic-vhd:b755f8ff82c8631d18decaebb09867e7b88c2533 dynamic-vhd: linuxkit/mkimage-dynamic-vhd:f76ac6c6803e9e25d09f22f7fe431e5386885a85
vmdk: linuxkit/mkimage-vmdk:20a370a55bd8d58c2ae9d634c297a955bb006efd vmdk: linuxkit/mkimage-vmdk:e2f2973907ca1ad412344cebd11bfa6d47dd6099
rpi3: linuxkit/mkimage-rpi3:4de9c144e4766bf283620371601c91638164b686 rpi3: linuxkit/mkimage-rpi3:4de9c144e4766bf283620371601c91638164b686

View File

@@ -60,7 +60,7 @@ type PkglibConfig struct {
func NewPkgInfo() pkgInfo { func NewPkgInfo() pkgInfo {
return pkgInfo{ return pkgInfo{
Org: "linuxkit", Org: "linuxkit",
Arches: []string{"amd64", "arm64"}, Arches: []string{"amd64", "arm64", "riscv64"},
Tag: "{{.Hash}}", Tag: "{{.Hash}}",
GitRepo: "https://github.com/linuxkit/linuxkit", GitRepo: "https://github.com/linuxkit/linuxkit",
Network: false, Network: false,

View File

@@ -70,6 +70,8 @@ func init() {
defaultArch = "x86_64" defaultArch = "x86_64"
case "s390x": case "s390x":
defaultArch = "s390x" defaultArch = "s390x"
case "riscv64":
defaultArch = "riscv64"
} }
switch { switch {
case runtime.GOARCH == "s390x": case runtime.GOARCH == "s390x":
@@ -475,6 +477,8 @@ func buildQemuCmdline(config QemuConfig) (QemuConfig, []string) {
goArch = "arm64" goArch = "arm64"
case "x86_64": case "x86_64":
goArch = "amd64" goArch = "amd64"
case "riscv64":
goArch = "riscv64"
default: default:
log.Fatalf("%s is an unsupported architecture.", config.Arch) log.Fatalf("%s is an unsupported architecture.", config.Arch)
} }

View File

@@ -20,6 +20,8 @@ func GoArch(in string) (string, error) {
return "amd64", nil return "amd64", nil
case "aarch64", "arm64": case "aarch64", "arm64":
return "arm64", nil return "arm64", nil
case "riscv64":
return "riscv64", nil
} }
return "", fmt.Errorf("unknown arch %q", in) return "", fmt.Errorf("unknown arch %q", in)
} }

View File

@@ -1 +1 @@
FROM alpine:3.19 FROM alpine:3.21

View File

@@ -1 +1 @@
FROM alpine:3.19 FROM alpine:3.21

View File

@@ -1 +1 @@
FROM alpine:3.19 FROM alpine:3.21

View File

@@ -1 +1 @@
FROM alpine:3.19 FROM alpine:3.21

View File

@@ -1,4 +1,4 @@
org: linuxkit org: linuxkit
image: image-in-build-args image: image-in-build-args
buildArgs: buildArgs:
- IMAGE=alpine:3.19 - IMAGE=alpine:3.21

View File

@@ -1 +1 @@
IMAGE=alpine:3.19 IMAGE=alpine:3.21

View File

@@ -1 +1 @@
IMAGE=alpine:3.19 IMAGE=alpine:3.21

View File

@@ -16,7 +16,7 @@ onboot:
command: ["/bin/sh", "/poweroff.sh", "10"] command: ["/bin/sh", "/poweroff.sh", "10"]
volumes: volumes:
- name: vola - name: vola
image: alpine:3.19 image: alpine:3.21
files: files:
- path: check.sh - path: check.sh
source: ./check.sh source: ./check.sh

View File

@@ -31,7 +31,7 @@ onboot:
command: ["/bin/sh", "/poweroff.sh", "10"] command: ["/bin/sh", "/poweroff.sh", "10"]
volumes: volumes:
- name: vola - name: vola
image: alpine:3.19 image: alpine:3.21
files: files:
- path: check.sh - path: check.sh
source: ./check.sh source: ./check.sh

View File

@@ -12,7 +12,7 @@ onboot:
image: linuxkit/mount:cb8caa72248f7082fc2074ce843d53cdc15df04a image: linuxkit/mount:cb8caa72248f7082fc2074ce843d53cdc15df04a
command: ["/usr/bin/mountie", "/var/lib/docker"] command: ["/usr/bin/mountie", "/var/lib/docker"]
- name: test - name: test
image: alpine:3.19 image: alpine:3.21
binds: binds:
- /var/lib/docker:/var/lib/docker - /var/lib/docker:/var/lib/docker
command: ["touch", "/var/lib/docker/bar"] command: ["touch", "/var/lib/docker/bar"]

View File

@@ -12,7 +12,7 @@ onboot:
image: linuxkit/mount:cb8caa72248f7082fc2074ce843d53cdc15df04a image: linuxkit/mount:cb8caa72248f7082fc2074ce843d53cdc15df04a
command: ["/usr/bin/mountie", "/var/lib/docker"] command: ["/usr/bin/mountie", "/var/lib/docker"]
- name: test - name: test
image: alpine:3.19 image: alpine:3.21
binds: binds:
- /var/lib/docker:/var/lib/docker - /var/lib/docker:/var/lib/docker
- /check.sh:/check.sh - /check.sh:/check.sh

View File

@@ -1,4 +1,4 @@
FROM debian:bullseye-slim as base FROM debian:trixie-slim as base
ARG TARGETARCH ARG TARGETARCH
@@ -12,6 +12,9 @@ ENV SYSLINUX="syslinux"
FROM base as syslinux-arm64 FROM base as syslinux-arm64
ENV SYSLINUX_arm64="syslinux-common" ENV SYSLINUX_arm64="syslinux-common"
FROM base as syslinux-riscv64
ENV SYSLINUX_riscv64="syslinux-common"
FROM syslinux-${TARGETARCH} as syslinux FROM syslinux-${TARGETARCH} as syslinux
RUN apt-get update && \ RUN apt-get update && \
apt-get -yq upgrade && \ apt-get -yq upgrade && \

View File

@@ -3,3 +3,4 @@ network: true
arches: arches:
- arm64 - arm64
- amd64 - amd64
- riscv64

View File

@@ -1,4 +1,4 @@
FROM linuxkit/guestfs:f85d370f7a3b0749063213c2dd451020e3a631ab FROM linuxkit/guestfs:8efdfac678bd6c621d3ccf916d70707ae09470f9
COPY . . COPY . .

View File

@@ -2,3 +2,4 @@ image: mkimage-dynamic-vhd
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -1,4 +1,4 @@
FROM linuxkit/guestfs:f85d370f7a3b0749063213c2dd451020e3a631ab FROM linuxkit/guestfs:8efdfac678bd6c621d3ccf916d70707ae09470f9
COPY . . COPY . .

View File

@@ -3,3 +3,4 @@ network: true
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -3,3 +3,4 @@ network: true
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -3,3 +3,4 @@ network: true
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -1,4 +1,4 @@
FROM linuxkit/guestfs:f85d370f7a3b0749063213c2dd451020e3a631ab FROM linuxkit/guestfs:8efdfac678bd6c621d3ccf916d70707ae09470f9
COPY . . COPY . .

View File

@@ -2,3 +2,4 @@ image: mkimage-vhd
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64

View File

@@ -1,4 +1,4 @@
FROM linuxkit/guestfs:f85d370f7a3b0749063213c2dd451020e3a631ab FROM linuxkit/guestfs:8efdfac678bd6c621d3ccf916d70707ae09470f9
COPY . . COPY . .

View File

@@ -2,3 +2,4 @@ image: mkimage-vmdk
arches: arches:
- amd64 - amd64
- arm64 - arm64
- riscv64