mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
fix: support risc-v (#23699)
This commit is contained in:
@@ -96,21 +96,6 @@ deb/%: cmd/%
|
||||
pkg/%: prepare_dir
|
||||
$(GO_INSTALL) $(REPO_PREFIX)/$@
|
||||
|
||||
rpm/fetcherfs: cmd/fetcherfs
|
||||
docker run --rm \
|
||||
--name docker-centos-build-fetcherfs \
|
||||
-v $(CURDIR):/data \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 \
|
||||
/bin/bash -c "VERSION=3.6 /data/build/build.sh fetcherfs /opt/yunion/fetchclient/bin"
|
||||
|
||||
deb/fetcherfs: rpm/fetcherfs
|
||||
#VERSION=3.6 $(DEB_BUILD_SCRIPT) fetcherfs /opt/yunion/fetchclient/bin
|
||||
docker run --rm \
|
||||
--name docker-debian-build-fetcherfs \
|
||||
-v $(CURDIR):/data \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/debian10-base:1.0 \
|
||||
/data/build/convert_rpm2deb.sh
|
||||
|
||||
build:
|
||||
$(MAKE) $(cmdTargets)
|
||||
|
||||
@@ -287,10 +272,6 @@ mod:
|
||||
define helpText
|
||||
Build with docker
|
||||
|
||||
make docker-centos-build F='-j4'
|
||||
make docker-centos-build F='-j4 cmd/region cmd/climc'
|
||||
make docker-centos-build-stop
|
||||
|
||||
make docker-alpine-build F='-j4'
|
||||
make docker-alpine-build F='-j4 cmd/host cmd/host-deployer'
|
||||
make docker-alpine-build-stop
|
||||
@@ -342,7 +323,7 @@ image:
|
||||
.PHONY: image
|
||||
|
||||
image-telegraf-raid-plugin:
|
||||
VERSION=release-1.6.5 ARCH=all make image telegraf-raid-plugin
|
||||
VERSION=release-1.6.6 GOOS=linux ARCH=all make image telegraf-raid-plugin
|
||||
|
||||
%:
|
||||
@:
|
||||
|
||||
+1
-23
@@ -8,8 +8,7 @@ endif
|
||||
ModBaseName:=$(notdir $(ModName))
|
||||
|
||||
DockerImageRegistry?=registry.cn-beijing.aliyuncs.com
|
||||
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.0-go-1.24.6-1
|
||||
DockerImageCentOSBuild?=$(DockerImageRegistry)/yunionio/centos-build:go-1.21.10-0
|
||||
DockerImageAlpineBuild?=$(DockerImageRegistry)/yunionio/alpine-build:3.22.2-go-1.24.9-0
|
||||
|
||||
EnvIf=$(if $($(1)),$(1)=$($(1)))
|
||||
|
||||
@@ -29,27 +28,6 @@ endef
|
||||
|
||||
tmpName=$(ModBaseName)-$(shell date +"%Y%m%d.%H%M%S%3N")
|
||||
|
||||
docker-centos-build: export dockerCentOSBuildCmd:=$(call dockerCentOSBuildCmd,$(F))
|
||||
docker-centos-build:
|
||||
docker rm --force docker-centos-build-$(tmpName) &>/dev/null || true
|
||||
docker run \
|
||||
--rm \
|
||||
--name docker-centos-build-$(tmpName) \
|
||||
-v $(CURDIR):/root/go/src/yunion.io/x/$(ModBaseName) \
|
||||
-v $(CURDIR)/_output/centos-build:/root/go/src/yunion.io/x/$(ModBaseName)/_output \
|
||||
-v $(CURDIR)/_output/centos-build/_cache:/root/.cache \
|
||||
$(DockerImageCentOSBuild) \
|
||||
/bin/bash -c "$$dockerCentOSBuildCmd"
|
||||
ls -lh _output/centos-build/bin
|
||||
|
||||
# NOTE we need a way to stop and remove the container started by docker-build.
|
||||
# No --tty, --stop-signal won't work
|
||||
docker-centos-build-stop:
|
||||
docker stop --time 0 docker-centos-build-$(tmpName) || true
|
||||
|
||||
.PHONY: docker-centos-build
|
||||
.PHONY: docker-centos-build-stop
|
||||
|
||||
|
||||
define dockerAlpineBuildCmd
|
||||
set -o xtrace
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:v1.1.3
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/ansibleserver-base:3.22.2-0
|
||||
|
||||
# https://github.com/yunionio/telegraf/blob/yn-release-1.36/Makefile.yn#L28
|
||||
# install playbook and telegraf install pkg
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/playbook /opt/yunion/playbook
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.4 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/playbook /opt/yunion/playbook
|
||||
COPY --from=registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.2 /opt/yunion/ansible-install-pkg /opt/yunion/ansible-install-pkg
|
||||
|
||||
ADD ./_output/alpine-build/bin/ansibleserver /opt/yunion/bin/ansibleserver
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.15.4-0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Yousong Zhou <zhouyousong@yunionyun.com>"
|
||||
LABEL maintainer="Yousong Zhou <zhouyousong@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
@@ -13,6 +13,7 @@ RUN set -x \
|
||||
&& apk add openssh-client \
|
||||
&& apk add sshpass \
|
||||
&& apk add py3-pip \
|
||||
&& apk add py3-paramiko \
|
||||
&& apk add tzdata git ca-certificates
|
||||
|
||||
RUN apk add --no-cache openssh openssl curl rsync pv mariadb-client
|
||||
@@ -23,7 +24,7 @@ RUN apk add --no-cache --virtual .build-dependencies \
|
||||
# after setuptools and wheel
|
||||
RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
RUN pip3 install -U pip setuptools wheel \
|
||||
&& pip3 install paramiko mysqlclient pywinrm \
|
||||
&& pip3 install mysqlclient pywinrm \
|
||||
&& pip3 install 'ansible<=9.0.0' \
|
||||
&& apk del --no-network .build-dependencies \
|
||||
&& rm -rf /root/.cache /root/.cargo /var/cache/apk/*
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/apigateway /opt/yunion/bin/apigateway
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/apimap /opt/yunion/bin/apimap
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/baremetal-base:v0.3.9-20231219.0
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
ADD ./_output/alpine-build/bin/baremetal-agent /opt/yunion/bin/baremetal-agent
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
|
||||
#RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
|
||||
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v3.10.8-20231215.0 as yunionos
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v4.0.0-20251110.1 as yunionos
|
||||
|
||||
FROM centos:8 as grub-stage
|
||||
|
||||
@@ -28,9 +27,9 @@ RUN cp /root/grub_arm64.efi /tftp
|
||||
RUN cp -rf /usr/lib/grub/arm64-efi /tftp/grub
|
||||
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3-3.13.5
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
@@ -70,6 +69,8 @@ COPY --from=yunionos /yunionos/x86_64/kernel /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/initramfs /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/aarch64/kernel /opt/cloud/yunion/baremetal/kernel_aarch64
|
||||
COPY --from=yunionos /yunionos/aarch64/initramfs /opt/cloud/yunion/baremetal/initramfs_aarch64
|
||||
COPY --from=yunionos /yunionos/riscv64/kernel /opt/cloud/yunion/baremetal/kernel_riscv64
|
||||
COPY --from=yunionos /yunionos/riscv64/initramfs /opt/cloud/yunion/baremetal/initramfs_riscv64
|
||||
|
||||
# TODO: syslinux firmwares should removed in future
|
||||
COPY --from=yunionos /yunionos/x86_64/isolinux.bin /opt/cloud/yunion/baremetal
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
#FROM --platform=linux/amd64 registry.cn-beijing.aliyuncs.com/yunionio/centos-build:1.1-4 as build
|
||||
#RUN yum install -y https://iso.yunion.cn/vm-images/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
|
||||
#RUN yum install -y http://192.168.23.50:8083/baremetal-pxerom-1.1.0-21092209.x86_64.rpm
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunionos:v3.10.8-20231215.0 as yunionos
|
||||
|
||||
FROM fedora-riscv64:42 as grub-stage
|
||||
|
||||
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
|
||||
RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
|
||||
RUN dnf install -y grub2*
|
||||
|
||||
# make grub_booti386 firmware
|
||||
RUN grub2-mkimage -d /usr/lib/grub/i386-pc/ -O i386-pc-pxe -o /root/grub_booti386 -p '/grub' pxe tftp boot linux ext2 xfs ntfs fat part_msdos part_gpt normal biosdisk
|
||||
# make grub_bootx64 firmware
|
||||
RUN grub2-mkimage -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi -o /root/grub_bootx64.efi -p '/grub' efinet tftp boot linux ext2 xfs ntfs fat part_msdos part_gpt normal efi_gop
|
||||
# make grub_arm64 firmware
|
||||
RUN grub2-mkimage -d /usr/lib/grub/arm64-efi/ -O arm64-efi -o /root/grub_arm64.efi -p '/grub' efinet tftp boot linux ext2 xfs ntfs fat part_msdos part_gpt normal efi_gop
|
||||
|
||||
RUN mkdir -p /tftp/grub
|
||||
|
||||
RUN cp /root/grub_booti386 /tftp
|
||||
RUN cp -rf /usr/lib/grub/i386-pc /tftp/grub
|
||||
|
||||
RUN cp /root/grub_bootx64.efi /tftp
|
||||
RUN cp -rf /usr/lib/grub/x86_64-efi /tftp/grub
|
||||
|
||||
RUN cp /root/grub_arm64.efi /tftp
|
||||
RUN cp -rf /usr/lib/grub/arm64-efi /tftp/grub
|
||||
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3-3.13.5
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache ipmitool ethtool tzdata ca-certificates cdrkit coreutils librados librbd && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
RUN mkdir -p /opt/cloud/yunion/baremetal
|
||||
|
||||
# udpate latest pci.ids
|
||||
RUN wget -O /opt/cloud/yunion/baremetal/pci.ids http://pci-ids.ucw.cz/v2.2/pci.ids
|
||||
|
||||
# download baremetal-pxerom-*.x86_64.rpm and unpack rpm in current directory
|
||||
#COPY --from=build /opt/cloud/yunion/baremetal/bootia32.efi /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build /opt/cloud/yunion/baremetal/bootx64.efi /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build /opt/cloud/yunion/baremetal/chain.c32 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/initramfs /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/isolinux.bin /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/kernel /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/ldlinux.c32 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/ldlinux.e32 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/ldlinux.e64 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/libcom32.c32 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/libutil.c32 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/lpxelinux.0 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/menu.c32 /opt/cloud/yunion/baremetal
|
||||
#COPY --from=build ./opt/cloud/yunion/baremetal/pxelinux.0 /opt/cloud/yunion/baremetal
|
||||
|
||||
# copy grub file
|
||||
COPY --from=grub-stage /tftp/grub_booti386 /opt/cloud/yunion/baremetal
|
||||
COPY --from=grub-stage /tftp/grub_bootx64.efi /opt/cloud/yunion/baremetal
|
||||
COPY --from=grub-stage /tftp/grub_arm64.efi /opt/cloud/yunion/baremetal
|
||||
COPY --from=grub-stage /tftp/grub /opt/cloud/yunion/baremetal/grub
|
||||
|
||||
# copy boot files from yunionos
|
||||
COPY --from=yunionos /yunionos/x86_64/kernel /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/initramfs /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/aarch64/kernel /opt/cloud/yunion/baremetal/kernel_aarch64
|
||||
COPY --from=yunionos /yunionos/aarch64/initramfs /opt/cloud/yunion/baremetal/initramfs_aarch64
|
||||
|
||||
# TODO: syslinux firmwares should removed in future
|
||||
COPY --from=yunionos /yunionos/x86_64/isolinux.bin /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/bootia32.efi /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/bootx64.efi /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/chain.c32 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/initramfs /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/kernel /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/ldlinux.c32 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/ldlinux.e32 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/ldlinux.e64 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/libcom32.c32 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/libutil.c32 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/lpxelinux.0 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/menu.c32 /opt/cloud/yunion/baremetal
|
||||
COPY --from=yunionos /yunionos/x86_64/pxelinux.0 /opt/cloud/yunion/baremetal
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:20230731.5
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/climc-base:3.22.2-2
|
||||
|
||||
ADD ./build/climc/root/opt /opt
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@ ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ Asia/Shanghai
|
||||
ENV TZ="Asia/Shanghai"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ="Asia/Shanghai"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
|
||||
|
||||
RUN apk add --no-cache bash bash-completion tzdata ca-certificates vim ipmitool ceph-common dropbear shadow && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
RUN usermod --shell /bin/bash root
|
||||
|
||||
RUN curl -L https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
|
||||
|
||||
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/cloudevent /opt/yunion/bin/cloudevent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/cloudid/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/cloudid /opt/yunion/bin/cloudid
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
RUN mkdir -p /etc/yunion/data/
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/cloudnet /opt/yunion/bin/cloudnet
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/cloudproxy /opt/yunion/bin/cloudproxy
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/devtool /opt/yunion/bin/devtool
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/dhcprelay /opt/yunion/bin/dhcprelay
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/esxi-agent /opt/yunion/bin/esxi-agent
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/file-repo:v0.5.0 AS file-repo
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.2
|
||||
|
||||
LABEL maintainer="Rain Zheng <zhengyu@yunion.com>"
|
||||
|
||||
# openssh-client, for ansible ssh connection
|
||||
# git, ca-certificates, for fetching ansible roles
|
||||
RUN set -x \
|
||||
&& apk update \
|
||||
&& apk add git \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
|
||||
# install default playbook and install pkg
|
||||
RUN mkdir -p /opt/yunion/ansible-install-pkg
|
||||
# file repo base image from https://github.com/yunionio/telegraf/blob/612b918a28a93cf8e354b8d59544753b021b824a/Makefile.yn#L24
|
||||
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.rpm /opt/yunion/ansible-install-pkg
|
||||
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.deb /opt/yunion/ansible-install-pkg
|
||||
COPY --from=file-repo /opt/yunion/ansible-install-pkg/telegraf*.zip /opt/yunion/ansible-install-pkg
|
||||
|
||||
RUN mkdir -p /opt/yunion/playbook
|
||||
RUN mkdir /opt/yunion/playbook/monitor-agent
|
||||
RUN git clone https://github.com/yunionio/monitor-agent.git /opt/yunion/playbook/monitor-agent --recurse-submodules
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/glance-base:v0.0.1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/glance-base:3.22.2-0
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/glance /opt/yunion/bin/glance
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:20210815.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/torrent:3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
RUN apk add --no-cache s3fs-fuse --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN apk add --no-cache s3fs-fuse
|
||||
|
||||
+215
-69
@@ -22,44 +22,25 @@
|
||||
#
|
||||
|
||||
# The Alpine Linux image that should be used as the basis for the guacd image
|
||||
ARG ALPINE_BASE_IMAGE=latest
|
||||
FROM alpine:${ALPINE_BASE_IMAGE} AS builder
|
||||
ARG ALPINE_BASE_IMAGE=3.22.2
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
# The target architecture of the build. Valid values are "ARM" and "X86". By
|
||||
# default, this is detected automatically.
|
||||
ARG BUILD_ARCHITECTURE
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
# The number of processes that may run simultaneously during the build. By
|
||||
# default, this is detected automatically.
|
||||
ARG BUILD_JOBS
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
cairo-dev \
|
||||
cmake \
|
||||
cunit-dev \
|
||||
git \
|
||||
grep \
|
||||
libjpeg-turbo-dev \
|
||||
libpng-dev \
|
||||
libtool \
|
||||
libwebp-dev \
|
||||
make \
|
||||
openssl1.1-compat-dev \
|
||||
pango-dev \
|
||||
pulseaudio-dev \
|
||||
util-linux-dev
|
||||
|
||||
# Copy source to container for sake of build
|
||||
# The directory that will house the guacamole-server source during the build
|
||||
ARG BUILD_DIR=/tmp/guacamole-server
|
||||
ARG GUAC_VER=1.5.3
|
||||
RUN git clone --branch=${GUAC_VER} https://github.com/apache/guacamole-server.git /tmp/guacamole-server
|
||||
|
||||
#
|
||||
# Base directory for installed build artifacts.
|
||||
#
|
||||
# NOTE: Due to limitations of the Docker image build process, this value is
|
||||
# duplicated in an ARG in the second stage of the build.
|
||||
#
|
||||
# FreeRDP version (default to version 2)
|
||||
ARG FREERDP_VERSION=2
|
||||
|
||||
# The final install location for guacamole-server and all dependencies. NOTE:
|
||||
# This value is hard-coded in the entrypoint. Any change to this value must be
|
||||
# propagated there.
|
||||
ARG PREFIX_DIR=/opt/guacamole
|
||||
|
||||
#
|
||||
@@ -67,11 +48,12 @@ ARG PREFIX_DIR=/opt/guacamole
|
||||
# library (these can be overridden at build time if a specific version is
|
||||
# needed)
|
||||
#
|
||||
ARG WITH_FREERDP='2(\.\d+)+'
|
||||
ARG WITH_FREERDP="${FREERDP_VERSION}(\.\d+)+"
|
||||
ARG WITH_LIBSSH2='libssh2-\d+(\.\d+)+'
|
||||
ARG WITH_LIBTELNET='\d+(\.\d+)+'
|
||||
ARG WITH_LIBVNCCLIENT='LibVNCServer-\d+(\.\d+)+'
|
||||
ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'
|
||||
ARG WITH_GUACAMOLE_SERVER='\d+(\.\d+)+'
|
||||
|
||||
#
|
||||
# Default build options for each core protocol support library, as well as
|
||||
@@ -79,6 +61,8 @@ ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'
|
||||
# options are needed)
|
||||
#
|
||||
|
||||
ARG FREERDP_ARM_OPTS=""
|
||||
|
||||
ARG FREERDP_OPTS="\
|
||||
-DBUILTIN_CHANNELS=OFF \
|
||||
-DCHANNEL_URBDRC=OFF \
|
||||
@@ -89,22 +73,25 @@ ARG FREERDP_OPTS="\
|
||||
-DWITH_CUPS=OFF \
|
||||
-DWITH_DIRECTFB=OFF \
|
||||
-DWITH_FFMPEG=OFF \
|
||||
-DWITH_FUSE=OFF \
|
||||
-DWITH_GSM=OFF \
|
||||
-DWITH_GSSAPI=OFF \
|
||||
-DWITH_IPP=OFF \
|
||||
-DWITH_JPEG=ON \
|
||||
-DWITH_KRB5=ON \
|
||||
-DWITH_LIBSYSTEMD=OFF \
|
||||
-DWITH_MANPAGES=OFF \
|
||||
-DWITH_OPENH264=OFF \
|
||||
-DWITH_OPENSSL=ON \
|
||||
-DWITH_OSS=OFF \
|
||||
-DWITH_PCSC=OFF \
|
||||
-DWITH_PKCS11=OFF \
|
||||
-DWITH_PULSE=OFF \
|
||||
-DWITH_SERVER=OFF \
|
||||
-DWITH_SERVER_INTERFACE=OFF \
|
||||
-DWITH_SHADOW_MAC=OFF \
|
||||
-DWITH_SHADOW_X11=OFF \
|
||||
-DWITH_SSE2=ON \
|
||||
-DWITH_SWSCALE=OFF \
|
||||
-DWITH_WAYLAND=OFF \
|
||||
-DWITH_X11=OFF \
|
||||
-DWITH_X264=OFF \
|
||||
@@ -116,21 +103,47 @@ ARG FREERDP_OPTS="\
|
||||
-DWITH_XRENDER=OFF \
|
||||
-DWITH_XTEST=OFF \
|
||||
-DWITH_XV=OFF \
|
||||
-DWITH_ZLIB=ON"
|
||||
-DCMAKE_CXX_FLAGS=-Wno-incompatible-pointer-types \
|
||||
-DCMAKE_C_FLAGS=-Wno-incompatible-pointer-types \
|
||||
-DWITH_ZLIB=ON"
|
||||
|
||||
|
||||
ARG FREERDP_X86_OPTS=""
|
||||
|
||||
ARG GUACAMOLE_SERVER_ARM_OPTS=""
|
||||
|
||||
ARG GUACAMOLE_SERVER_OPTS="\
|
||||
--disable-guaclog"
|
||||
--disable-guaclog \
|
||||
CPPFLAGS=-Wno-error=deprecated-declarations"
|
||||
|
||||
ARG GUACAMOLE_SERVER_X86_OPTS=""
|
||||
ARG GUACAMOLE_SERVER_UNKNOWN_OPTS=""
|
||||
|
||||
ARG LIBSSH2_ARM_OPTS=""
|
||||
|
||||
|
||||
ARG LIBSSH2_OPTS="\
|
||||
-DBUILD_EXAMPLES=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON"
|
||||
|
||||
ARG LIBSSH2_X86_OPTS=""
|
||||
|
||||
ARG LIBTELNET_ARM_OPTS=""
|
||||
|
||||
ARG LIBTELNET_OPTS="\
|
||||
--disable-static \
|
||||
--disable-util"
|
||||
|
||||
ARG LIBTELNET_X86_OPTS=""
|
||||
|
||||
ARG LIBVNCCLIENT_ARM_OPTS=""
|
||||
|
||||
ARG LIBVNCCLIENT_OPTS=""
|
||||
|
||||
ARG LIBVNCCLIENT_X86_OPTS=""
|
||||
|
||||
ARG LIBWEBSOCKETS_ARM_OPTS=""
|
||||
|
||||
ARG LIBWEBSOCKETS_OPTS="\
|
||||
-DDISABLE_WERROR=ON \
|
||||
-DLWS_WITHOUT_SERVER=ON \
|
||||
@@ -141,45 +154,179 @@ ARG LIBWEBSOCKETS_OPTS="\
|
||||
-DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
|
||||
-DLWS_WITH_STATIC=OFF"
|
||||
|
||||
# Build guacamole-server and its core protocol library dependencies
|
||||
RUN echo "$TARGETPLATFORM"
|
||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; \
|
||||
then FREERDP_OPTS="${FREERDP_OPTS} -DWITH_SSE2=ON" && echo "SSE2 active"; \
|
||||
else FREERDP_OPTS="${FREERDP_OPTS} -DWITH_SSE2=OFF" && echo "SSE2 disabled"; \
|
||||
fi && ${BUILD_DIR}/src/guacd-docker/bin/build-all.sh
|
||||
ARG LIBWEBSOCKETS_X86_OPTS=""
|
||||
|
||||
#
|
||||
# Base builder image that will be used by subsequent build stages, including
|
||||
# for building dependencies of guacamole-server.
|
||||
#
|
||||
|
||||
FROM alpine:${ALPINE_BASE_IMAGE} AS builder
|
||||
ARG BUILD_DIR
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add \
|
||||
autoconf \
|
||||
automake \
|
||||
build-base \
|
||||
cairo-dev \
|
||||
cjson-dev \
|
||||
cmake \
|
||||
cunit-dev \
|
||||
git \
|
||||
grep \
|
||||
krb5-dev \
|
||||
libjpeg-turbo-dev \
|
||||
libpng-dev \
|
||||
libtool \
|
||||
libwebp-dev \
|
||||
make \
|
||||
openssl-dev \
|
||||
pango-dev \
|
||||
pulseaudio-dev \
|
||||
sdl2-dev \
|
||||
sdl2_ttf-dev \
|
||||
util-linux-dev
|
||||
|
||||
ARG GUAC_VER=1.6.0
|
||||
RUN git clone --branch=${GUAC_VER} https://github.com/apache/guacamole-server.git ${BUILD_DIR}
|
||||
|
||||
|
||||
#
|
||||
# Build dependency: libssh2
|
||||
#
|
||||
|
||||
FROM builder AS libssh2
|
||||
ARG BUILD_DIR
|
||||
ARG LIBSSH2_ARM_OPTS
|
||||
ARG LIBSSH2_OPTS
|
||||
ARG LIBSSH2_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBSSH2
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBSSH2" \
|
||||
"https://github.com/libssh2/libssh2"
|
||||
|
||||
#
|
||||
# Build dependency: libtelnet
|
||||
#
|
||||
|
||||
FROM builder AS libtelnet
|
||||
ARG BUILD_DIR
|
||||
ARG LIBTELNET_ARM_OPTS
|
||||
ARG LIBTELNET_OPTS
|
||||
ARG LIBTELNET_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBTELNET
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBTELNET" \
|
||||
"https://github.com/seanmiddleditch/libtelnet"
|
||||
|
||||
#
|
||||
# Build dependency: libvncclient
|
||||
#
|
||||
|
||||
FROM builder AS libvncclient
|
||||
ARG BUILD_DIR
|
||||
ARG LIBVNCCLIENT_ARM_OPTS
|
||||
ARG LIBVNCCLIENT_OPTS
|
||||
ARG LIBVNCCLIENT_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBVNCCLIENT
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBVNCCLIENT" \
|
||||
"https://github.com/LibVNC/libvncserver"
|
||||
|
||||
#
|
||||
# Build dependency: libwebsockets
|
||||
#
|
||||
|
||||
FROM builder AS libwebsockets
|
||||
ARG BUILD_DIR
|
||||
ARG LIBWEBSOCKETS_ARM_OPTS
|
||||
ARG LIBWEBSOCKETS_OPTS
|
||||
ARG LIBWEBSOCKETS_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_LIBWEBSOCKETS
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBWEBSOCKETS" \
|
||||
"https://github.com/warmcat/libwebsockets"
|
||||
|
||||
#
|
||||
# Build dependency: FreeRDP
|
||||
#
|
||||
|
||||
FROM builder AS freerdp
|
||||
ARG BUILD_DIR
|
||||
ARG FREERDP_ARM_OPTS
|
||||
ARG FREERDP_OPTS
|
||||
ARG FREERDP_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_FREERDP
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "FREERDP" \
|
||||
"https://github.com/FreeRDP/FreeRDP"
|
||||
|
||||
#
|
||||
# STAGE 7: Collect dependencies built by previous stages and build
|
||||
# guacamole-server.
|
||||
#
|
||||
|
||||
FROM builder AS guacamole-server
|
||||
ARG BUILD_DIR
|
||||
ARG FREERDP_VERSION
|
||||
ARG GUACAMOLE_SERVER_ARM_OPTS
|
||||
ARG GUACAMOLE_SERVER_UNKNOWN_OPTS
|
||||
ARG GUACAMOLE_SERVER_OPTS
|
||||
ARG GUACAMOLE_SERVER_X86_OPTS
|
||||
ARG PREFIX_DIR
|
||||
ARG WITH_GUACAMOLE_SERVER
|
||||
|
||||
# Copy dependencies built in previous stages
|
||||
COPY --from=freerdp ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libssh2 ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libtelnet ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libvncclient ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=libwebsockets ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
|
||||
# Use guacamole-server source from build context
|
||||
|
||||
COPY --from=builder ${BUILD_DIR} ${BUILD_DIR}
|
||||
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "GUACAMOLE_SERVER" "${BUILD_DIR}"
|
||||
|
||||
# Determine location of the FREERDP library based on the version.
|
||||
ARG FREERDP_LIB_PATH=${PREFIX_DIR}/lib/freerdp${FREERDP_VERSION}
|
||||
|
||||
# Record the packages of all runtime library dependencies
|
||||
RUN ${BUILD_DIR}/src/guacd-docker/bin/list-dependencies.sh \
|
||||
${PREFIX_DIR}/sbin/guacd \
|
||||
${PREFIX_DIR}/lib/libguac-client-*.so \
|
||||
${PREFIX_DIR}/lib/freerdp2/*guac*.so \
|
||||
${FREERDP_LIB_PATH}/*guac*.so \
|
||||
> ${PREFIX_DIR}/DEPENDENCIES
|
||||
|
||||
#
|
||||
# STAGE 8: Final, runtime image.
|
||||
#
|
||||
|
||||
# Use same Alpine version as the base for the runtime image
|
||||
FROM alpine:${ALPINE_BASE_IMAGE}
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
#
|
||||
# Base directory for installed build artifacts. See also the
|
||||
# CMD directive at the end of this build stage.
|
||||
#
|
||||
# NOTE: Due to limitations of the Docker image build process, this value is
|
||||
# duplicated in an ARG in the first stage of the build.
|
||||
#
|
||||
ARG PREFIX_DIR=/opt/guacamole
|
||||
|
||||
# Runtime environment
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
|
||||
ENV GUACD_LOG_LEVEL=info
|
||||
FROM alpine:${ALPINE_BASE_IMAGE} AS runtime
|
||||
ARG PREFIX_DIR
|
||||
ARG BUILD_DIR
|
||||
|
||||
# Copy build artifacts into this stage
|
||||
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
COPY --from=guacamole-server ${PREFIX_DIR} ${PREFIX_DIR}
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN cat ${PREFIX_DIR}/DEPENDENCIES
|
||||
|
||||
# Bring runtime environment up to date and install runtime dependencies
|
||||
RUN apk add --no-cache \
|
||||
ca-certificates \
|
||||
font-noto-cjk \
|
||||
ghostscript \
|
||||
netcat-openbsd \
|
||||
shadow \
|
||||
@@ -189,6 +336,10 @@ RUN apk add --no-cache \
|
||||
util-linux-login && \
|
||||
xargs apk add --no-cache < ${PREFIX_DIR}/DEPENDENCIES
|
||||
|
||||
# Runtime environment
|
||||
ENV LC_ALL=C.UTF-8
|
||||
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
|
||||
|
||||
# Checks the operating status every 5 minutes with a timeout of 5 seconds
|
||||
HEALTHCHECK --interval=5m --timeout=5s CMD nc -z 127.0.0.1 4822 || exit 1
|
||||
|
||||
@@ -197,8 +348,6 @@ ARG UID=1000
|
||||
ARG GID=1000
|
||||
RUN groupadd --gid $GID guacd
|
||||
RUN useradd --system --create-home --shell /sbin/nologin --uid $UID --gid $GID guacd
|
||||
RUN mkdir -p /opt/cloudpods
|
||||
RUN chown -R guacd:guacd /opt/cloudpods
|
||||
|
||||
# Run with user guacd
|
||||
USER guacd
|
||||
@@ -206,9 +355,6 @@ USER guacd
|
||||
# Expose the default listener port
|
||||
EXPOSE 4822
|
||||
|
||||
# Start guacd, listening on port 0.0.0.0:4822
|
||||
#
|
||||
# Note the path here MUST correspond to the value specified in the
|
||||
# PREFIX_DIR build argument.
|
||||
#
|
||||
CMD /opt/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -f
|
||||
COPY --from=guacamole-server ${BUILD_DIR}/src/guacd-docker/bin/entrypoint.sh /opt/guacamole/
|
||||
#COPY
|
||||
ENTRYPOINT [ "/opt/guacamole/entrypoint.sh" ]
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.8.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.9.0
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/host /opt/yunion/bin/host
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.4.11
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-deployer-base:1.5.2
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
ADD ./_output/centos-build/bin/host-deployer /opt/yunion/bin/host-deployer
|
||||
ADD ./_output/alpine-build/bin/host-deployer /opt/yunion/bin/host-deployer
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/host-health /opt/yunion/bin/host-health
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/host-image /opt/yunion/bin/host-image
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/keystone /opt/yunion/bin/keystone
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.22.1
|
||||
FROM alpine:3.22.2
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
@@ -6,4 +6,4 @@ ARG TARGETARCH
|
||||
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >>/etc/apk/repositories
|
||||
RUN apk update && apk add curl android-tools && rm -rf /var/cache/apk/*
|
||||
RUN curl https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
|
||||
RUN curl -L https://iso.yunion.cn/binaries/kubernetes-release/release/v1.22.9/bin/linux/${TARGETARCH}/kubectl -o /usr/bin/kubectl && chmod a+x /usr/bin/kubectl
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/lbagent-base:v0.0.4
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/lbagent-base:v0.0.5
|
||||
|
||||
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
LABEL maintainer="Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/lbagent /opt/yunion/bin/lbagent
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-2
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-5
|
||||
|
||||
MAINTAINER "Jian QIU <qiujian@yunion.cn>"
|
||||
LABEL maintainer="Jian QIU <qiujian@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
ENV GOPATH=/root/go
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
RUN sed -i 's!v3.20/!v3.22/!g' /etc/apk/repositories
|
||||
|
||||
RUN set -x \
|
||||
&& apk update \
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-2
|
||||
|
||||
MAINTAINER "Jian QIU <qiujian@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN set -x \
|
||||
&& apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add --no-cache bash haproxy keepalived iptables \
|
||||
&& apk add --no-cache --virtual .build-deps \
|
||||
build-base \
|
||||
make \
|
||||
git \
|
||||
gcc \
|
||||
libc-dev \
|
||||
libgcc \
|
||||
linux-headers
|
||||
|
||||
RUN set -x \
|
||||
&& apk add --no-cache curl \
|
||||
&& curl -L -O https://go.dev/dl/go1.25.1.linux-riscv64.tar.gz \
|
||||
&& tar -xzf go1.25.1.linux-riscv64.tar.gz -C /usr/local \
|
||||
&& rm go1.25.1.linux-riscv64.tar.gz
|
||||
|
||||
|
||||
ENV GOROOT=/usr/local/go
|
||||
ENV GOPATH=/root/go
|
||||
ENV PATH=$GOROOT/bin:$GOPATH/bin:$PATH
|
||||
|
||||
RUN set -x \
|
||||
&& mkdir -p $GOPATH/src/github.com/yyyar $GOPATH/bin \
|
||||
&& cd $GOPATH/src/github.com/yyyar \
|
||||
&& git clone --depth 1 https://github.com/yyyar/gobetween.git \
|
||||
&& cd gobetween \
|
||||
&& make deps \
|
||||
&& make build \
|
||||
&& cp bin/gobetween /bin/gobetween \
|
||||
&& rm -fr $GOPATH \
|
||||
&& apk del .build-deps \
|
||||
&& rm -rf /var/cache/apk/*
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/llm /opt/yunion/bin/llm
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/logger /opt/yunion/bin/logger
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/mcp-server /opt/yunion/bin/mcp-server
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/monitor/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/monitor /opt/yunion/bin/monitor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/notify/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/notify /opt/yunion/bin/notify
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# TODO: use 3.14 will lead 'apk add qemu-img fail on arm64'
|
||||
FROM alpine:3.22.1
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM alpine:3.15.4
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
FROM alpine:3.22.2
|
||||
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache tzdata curl busybox-extras tcpdump strace ca-certificates && \
|
||||
rm -rf /var/cache/apk/*
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
COPY ./build/region/root/opt/ /opt/
|
||||
ADD ./_output/alpine-build/bin/region /opt/yunion/bin/region
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/region-dns /opt/yunion/bin/region-dns
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/s3gateway /opt/yunion/bin/s3gateway
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/scheduledtask /opt/yunion/bin/scheduledtask
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/scheduler /opt/yunion/bin/scheduler
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v1.1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/yunion-rootfs:v4.0.0-20251112.0
|
||||
|
||||
ADD ./_output/centos-build/bin/telegraf-raid-plugin /opt/yunion/bin/telegraf-raid-plugin
|
||||
ADD ./_output/alpine-build/bin/telegraf-raid-plugin /opt/yunion/bin/telegraf-raid-plugin
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
# HACK: use v3.14 alpine mirror to upgrade qemu-img
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
|
||||
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache qemu-img && \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.10.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/openvswitch:2.12.4-5
|
||||
|
||||
MAINTAINER "Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
LABEL maintainer="Yousong Zhou <zhouyousong@yunion.cn>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
ADD ./_output/alpine-build/bin/vpcagent /opt/yunion/bin/vpcagent
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20230731.2
|
||||
# FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20240514.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:20240909.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/webconsole-base:3.22.2-1
|
||||
|
||||
ADD ./_output/alpine-build/bin/webconsole /opt/yunion/bin/webconsole
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/kubectl:1.22.9
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/kubectl:3.22.2-1
|
||||
|
||||
MAINTAINER "Zexi Li <lizexi@yunionyun.com>"
|
||||
LABEL maintainer="Zexi Li <lizexi@yunionyun.com>"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5-1
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
ADD ./_output/alpine-build/bin/yunionconf /opt/yunion/bin/yunionconf
|
||||
|
||||
+21
-23
@@ -9,31 +9,36 @@ debian10-base:
|
||||
|
||||
ONECLOUD_BASE_VERSION = v0.3-3.13.5
|
||||
ONECLOUD_BASE_VERSION_3-15-4 = v3.15.4-0
|
||||
ONECLOUD_BASE_VERSION_3-22-2 = 3.22.2-0
|
||||
|
||||
onecloud-base:
|
||||
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION) -f ./Dockerfile.onecloud-base .
|
||||
onecloud-base-3-15-4:
|
||||
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-15-4) -f ./Dockerfile.onecloud-base-3-15-4 .
|
||||
onecloud-base-3-22-2:
|
||||
$(DOCKER_BUILDX)/onecloud-base:$(ONECLOUD_BASE_VERSION_3-22-2) -f ./Dockerfile.onecloud-base-3-22-2 .
|
||||
|
||||
ANSIBLESERVER_BASE = v1.1.3
|
||||
ANSIBLESERVER_BASE = 3.22.2-0
|
||||
|
||||
ansibleserver-base:
|
||||
$(DOCKER_BUILDX)/ansibleserver-base:$(ANSIBLESERVER_BASE) -f ./Dockerfile.ansibleserver-base .
|
||||
|
||||
CLIMC_BASE_VERSION = 20230731.5
|
||||
CLIMC_BASE_VERSION_3-22-2 = 3.22.2-2
|
||||
|
||||
climc-base:
|
||||
docker buildx build --platform linux/arm64,linux/amd64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
|
||||
$(DOCKER_BUILDX)/climc-base:$(CLIMC_BASE_VERSION) -f ./Dockerfile.climc-base .
|
||||
|
||||
KUBECTL_VERSION = 1.22.9
|
||||
climc-base-3-22-2:
|
||||
$(DOCKER_BUILDX)/climc-base:$(CLIMC_BASE_VERSION_3-22-2) -f ./Dockerfile.climc-base-3-22-2 .
|
||||
|
||||
KUBECTL_VERSION_3-22-2 = 3.22.2-1
|
||||
kubectl:
|
||||
docker buildx build --platform linux/arm64,linux/amd64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/kubectl:$(KUBECTL_VERSION) -f ./Dockerfile.kubectl .
|
||||
$(DOCKER_BUILDX)/kubectl:$(KUBECTL_VERSION_3-22-2) -f ./Dockerfile.kubectl .
|
||||
|
||||
WEBCONSOLE_BASE_VERSION = 20240909.0
|
||||
WEBCONSOLE_BASE_VERSION_3-22-2 = 3.22.2-1
|
||||
webconsole-base:
|
||||
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION) -f ./Dockerfile.webconsole-base .
|
||||
$(DOCKER_BUILDX)/webconsole-base:$(WEBCONSOLE_BASE_VERSION_3-22-2) -f ./Dockerfile.webconsole-base .
|
||||
|
||||
BAREMETAL_BASE_VERSION = v0.3.9-20231219.1
|
||||
|
||||
@@ -53,17 +58,18 @@ baremetal-base:
|
||||
#docker push $(REGISTRY)/baremetal-base:$(BAREMETAL_BASE_VERSION)
|
||||
|
||||
TORRENT_VERSION = 20210815.0
|
||||
TORRENT_VERSION_3-22-2 = 3.22.2-0
|
||||
torrent:
|
||||
$(DOCKER_BUILDX)/torrent:$(TORRENT_VERSION) -f ./Dockerfile.torrent .
|
||||
|
||||
GLANCE_BASE_VERSION = v0.0.1
|
||||
GLANCE_BASE_VERSION_3-22-2 = 3.22.2-0
|
||||
glance-base:
|
||||
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION) -f ./Dockerfile.glance-base .
|
||||
|
||||
FILE_REPO_VERSION = v0.5.4
|
||||
glance-base-3-22-2:
|
||||
$(DOCKER_BUILDX)/glance-base:$(GLANCE_BASE_VERSION_3-22-2) -f ./Dockerfile.glance-base .
|
||||
|
||||
file-repo:
|
||||
$(DOCKER_BUILDX)/file-repo:$(FILE_REPO_VERSION) -f ./Dockerfile.file-repo . --no-cache
|
||||
|
||||
HOST_IMAGE_VERSION ?= v1.0.2
|
||||
HOST_IMAGE_NAME = $(REGISTRY)/host-image:$(HOST_IMAGE_VERSION)
|
||||
@@ -77,19 +83,11 @@ host-image:
|
||||
docker manifest annotate $(HOST_IMAGE_NAME) $(HOST_IMAGE_NAME)-arm64 --arch arm64
|
||||
docker manifest push $(HOST_IMAGE_NAME)
|
||||
|
||||
LBAGENT_BASE_VERSION = v0.0.3
|
||||
LBAGENT_BASE_VERSION = v0.0.5
|
||||
lbagent-base:
|
||||
$(DOCKER_BUILDX)/lbagent-base:$(LBAGENT_BASE_VERSION) -f ./Dockerfile.lbagent-base .
|
||||
|
||||
lbagent-base-riscv:
|
||||
$(DOCKER_BUILDX)/lbagent-base:$(LBAGENT_BASE_VERSION) -f ./Dockerfile.lbagent-base-riscv
|
||||
|
||||
GUACD_VERSION=1.5.3
|
||||
GUACD_VERSION=1.6.0
|
||||
guacd:
|
||||
docker buildx build --platform linux/arm64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-arm64 -f ./Dockerfile.guacd .
|
||||
docker buildx build --platform linux/amd64 --push \
|
||||
-t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-amd64 -f ./Dockerfile.guacd .
|
||||
docker buildx imagetools create -t registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION) \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-amd64 \
|
||||
registry.cn-beijing.aliyuncs.com/yunionio/guacd:$(GUACD_VERSION)-arm64
|
||||
$(DOCKER_BUILDX)/guacd:$(GUACD_VERSION) -f ./Dockerfile.guacd .
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.0-go-1.24.6-0 as build
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.2-go-1.24.9-0 AS build
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
RUN mkdir -p /root/go/src/yunion.io/x/onecloud
|
||||
@@ -7,11 +7,11 @@ COPY . /root/go/src/yunion.io/x/onecloud
|
||||
WORKDIR /root/go/src/yunion.io/x/onecloud
|
||||
RUN make cmd/host
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.8.0
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/host-base:v0.9.0
|
||||
|
||||
MAINTAINER "Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
LABEL maintainer="Yaoqi Wan wanyaoqi@yunionyun.com"
|
||||
|
||||
ENV TZ UTC
|
||||
ENV TZ="UTC"
|
||||
|
||||
RUN mkdir -p /opt/yunion/bin
|
||||
COPY --from=build /root/go/src/yunion.io/x/onecloud/_output/bin/host /opt/yunion/bin/host
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:1.0-5 as build
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/alpine-build:3.22.2-go-1.24.9-0 AS build
|
||||
ARG TARGETPLATFORM
|
||||
ARG BUILDPLATFORM
|
||||
|
||||
@@ -6,13 +6,11 @@ RUN mkdir -p /root/go/src/yunion.io/x/onecloud
|
||||
COPY . /root/go/src/yunion.io/x/onecloud
|
||||
RUN cd /root/go/src/yunion.io/x/onecloud && make cmd/torrent
|
||||
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v0.3.5
|
||||
FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
|
||||
|
||||
MAINTAINER "Zexi Li <zexi.li@icloud.com>"
|
||||
LABEL maintainer="Zexi Li <zexi.li@icloud.com>"
|
||||
|
||||
# HACK: use v3.14 alpine mirror to upgrade qemu-img
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/main > /etc/apk/repositories
|
||||
RUN echo http://dl-cdn.alpinelinux.org/alpine/v3.14/community >> /etc/apk/repositories
|
||||
RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache qemu-img && \
|
||||
|
||||
@@ -157,6 +157,7 @@ const (
|
||||
OS_ARCH_X86_64 = "x86_64"
|
||||
OS_ARCH_AARCH32 = "aarch32"
|
||||
OS_ARCH_AARCH64 = "aarch64"
|
||||
OS_ARCH_RISCV64 = "riscv64"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -45,6 +45,7 @@ import (
|
||||
"yunion.io/x/onecloud/pkg/hostman/diskutils/nbd"
|
||||
"yunion.io/x/onecloud/pkg/hostman/diskutils/qemu_kvm"
|
||||
"yunion.io/x/onecloud/pkg/hostman/guestfs/fsdriver"
|
||||
"yunion.io/x/onecloud/pkg/hostman/guestman/arch"
|
||||
deployapi "yunion.io/x/onecloud/pkg/hostman/hostdeployer/apis"
|
||||
"yunion.io/x/onecloud/pkg/hostman/hostdeployer/consts"
|
||||
"yunion.io/x/onecloud/pkg/hostman/hostdeployer/uefi"
|
||||
@@ -461,14 +462,17 @@ func (s *SDeployService) PrepareEnv() error {
|
||||
"/usr/bin/.chntpw.static.bin": "/opt/yunion/bin/.chntpw.static.bin",
|
||||
"/usr/bin/bundles/chntpw.static": "/opt/yunion/bin/bundles/chntpw.static",
|
||||
"/usr/bin/growpart": "/opt/yunion/bin/growpart",
|
||||
"/usr/sbin/zerofree": "/opt/yunion/bin/zerofree",
|
||||
"/usr/bin/zerofree": "/opt/yunion/bin/zerofree",
|
||||
}
|
||||
// x86_64 or aarch64
|
||||
if cpuArchStr == qemu_kvm.OS_ARCH_AARCH64 {
|
||||
switch cpuArchStr {
|
||||
case qemu_kvm.OS_ARCH_AARCH64:
|
||||
copyFiles["/yunionos/aarch64/qemu-ga"] = fsdriver.QGA_BINARY_PATH
|
||||
} else {
|
||||
case arch.Arch_x86_64:
|
||||
copyFiles["/yunionos/x86_64/qemu-ga"] = fsdriver.QGA_BINARY_PATH
|
||||
copyFiles["/yunionos/x86_64/qemu-ga-x86_64.msi"] = fsdriver.QGA_WIN_MSI_INSTALLER_PATH
|
||||
case "riscv64":
|
||||
copyFiles["/yunionos/riscv64/qemu-ga"] = fsdriver.QGA_BINARY_PATH
|
||||
}
|
||||
|
||||
for k, v := range copyFiles {
|
||||
@@ -495,8 +499,8 @@ func (s *SDeployService) PrepareEnv() error {
|
||||
return errors.Wrap(err, "Failed to mkdir RUN_ON_HOST_ROOT_PATH: %s")
|
||||
}
|
||||
|
||||
cmd := fmt.Sprintf("mkisofs -l -J -L -R -r -v -hide-rr-moved -o %s -graft-points vmware-vddk=/opt/vmware-vddk yunion=/opt/yunion", qemu_kvm.DEPLOY_ISO)
|
||||
out, err = procutils.NewCommand("bash", "-c", cmd).Output()
|
||||
mkisofsArgs := []string{"-l", "-J", "-L", "-R", "-r", "-v", "-hide-rr-moved", "-o", qemu_kvm.DEPLOY_ISO, "-graft-points", "vmware-vddk=/opt/vmware-vddk", "yunion=/opt/yunion"}
|
||||
out, err = procutils.NewCommand("mkisofs", mkisofsArgs...).Output()
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "mkisofs failed %s", out)
|
||||
}
|
||||
|
||||
@@ -2715,6 +2715,10 @@ func (h *SHostInfo) IsAarch64() bool {
|
||||
return h.GetCpuArchitecture() == apis.OS_ARCH_AARCH64
|
||||
}
|
||||
|
||||
func (h *SHostInfo) IsRiscV() bool {
|
||||
return h.GetCpuArchitecture() == apis.OS_ARCH_RISCV64
|
||||
}
|
||||
|
||||
func (h *SHostInfo) IsX8664() bool {
|
||||
return h.GetCpuArchitecture() == apis.OS_ARCH_X86_64
|
||||
}
|
||||
@@ -2837,6 +2841,8 @@ func NewHostInfo() (*SHostInfo, error) {
|
||||
|
||||
if res.IsAarch64() {
|
||||
qemutils.UseAarch64()
|
||||
} else if res.IsRiscV() {
|
||||
qemutils.UseRiscV()
|
||||
} else if !res.IsX8664() {
|
||||
return nil, fmt.Errorf("unsupport cpu architecture %s", cpu.CpuArchitecture)
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ func UseAarch64() {
|
||||
qemuSystemCmd = "qemu-system-aarch64"
|
||||
}
|
||||
|
||||
func UseRiscV() {
|
||||
qemuSystemCmd = "qemu-system-riscv64"
|
||||
}
|
||||
|
||||
func GetQemu(version string) string {
|
||||
return getQemuCmd(qemuSystemCmd, version)
|
||||
}
|
||||
|
||||
@@ -73,9 +73,6 @@ build_bin() {
|
||||
rm -vf _output/bin/*cli
|
||||
env $BUILD_ARCH $BUILD_CGO make -C "$SRC_DIR" docker-alpine-build F="cmd/$1 cmd/*cli"
|
||||
;;
|
||||
host-deployer | telegraf-raid-plugin)
|
||||
env $BUILD_ARCH $BUILD_CGO make -C "$SRC_DIR" docker-centos-build F="cmd/$1"
|
||||
;;
|
||||
*)
|
||||
env $BUILD_ARCH $BUILD_CGO make -C "$SRC_DIR" docker-alpine-build F="cmd/$1"
|
||||
;;
|
||||
@@ -228,13 +225,16 @@ make_manifest_image() {
|
||||
if [[ "$img_name" == *:5000/* ]]; then
|
||||
docker push $img_name-amd64
|
||||
docker push $img_name-arm64
|
||||
docker push $img_name-riscv64
|
||||
fi
|
||||
|
||||
docker buildx imagetools create -t $img_name \
|
||||
$img_name-amd64 \
|
||||
$img_name-arm64
|
||||
$img_name-arm64 \
|
||||
$img_name-riscv64
|
||||
docker manifest inspect ${img_name} | grep -wq amd64
|
||||
docker manifest inspect ${img_name} | grep -wq arm64
|
||||
docker manifest inspect ${img_name} | grep -wq riscv64
|
||||
}
|
||||
|
||||
ALL_COMPONENTS=$(ls cmd | grep -v '.*cli$' | xargs)
|
||||
@@ -314,7 +314,7 @@ for component in $COMPONENTS; do
|
||||
|
||||
case "$ARCH" in
|
||||
all)
|
||||
for arch in "arm64" "amd64"; do
|
||||
for arch in "arm64" "amd64" "riscv64"; do
|
||||
general_build $component $arch "true"
|
||||
done
|
||||
make_manifest_image $component
|
||||
|
||||
Reference in New Issue
Block a user