Skip to content

Commit

Permalink
support kylin gfb
Browse files Browse the repository at this point in the history
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
  • Loading branch information
ErikJiang committed Sep 27, 2024
1 parent 28c4fd2 commit e884977
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/os-pkgs-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{ "name": "rocky9", "dockerfile":"build/os-packages/Dockerfile.rocky9"},
{ "name": "kylin-v10sp2", "dockerfile":"build/os-packages/Dockerfile.kylin-v10sp2"},
{ "name": "kylin-v10sp3", "dockerfile":"build/os-packages/Dockerfile.kylin-v10sp3"},
{ "name": "kylin-v10gfb", "dockerfile":"build/os-packages/Dockerfile.kylin-v10gfb"},
{ "name": "openeuler22.03", "dockerfile":"build/os-packages/Dockerfile.openeuler22.03"},
{ "name": "oracle8", "dockerfile":"build/os-packages/Dockerfile.oracle8"},
{ "name": "oracle9", "dockerfile":"build/os-packages/Dockerfile.oracle9"},
Expand Down
29 changes: 29 additions & 0 deletions build/os-packages/Dockerfile.kylin-v10gfb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM rockylinux:8 as os-kylin-v10gfb
ARG OS_VERSION=10
ARG BUILD_TOOLS="dnf-utils dnf-plugins-core createrepo"

WORKDIR /kylin/${OS_VERSION}/gfb/os
COPY build/os-packages/repos/kylin.gfb.repo /etc/yum.repos.d/
COPY build/os-packages/repos/kylin.sp3.repo /etc/yum.repos.d/
COPY build/os-packages/packages.yml .
COPY --from=mikefarah/yq:4.30.8 /usr/bin/yq /usr/bin/yq
RUN yq eval '.common[],.yum[],.kylin-gfb[]' packages.yml > packages.list

RUN ARCH=$(uname -m) \
&& dnf install -y ${BUILD_TOOLS} \
&& dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \
&& mkdir /etc/yum.repos.d.sp3/ && mv /etc/yum.repos.d/kylin.sp3.repo /etc/yum.repos.d.sp3/ \
&& rm -rf /etc/yum.repos.d/Rocky* && dnf clean all && dnf makecache \
&& while read -r line; do \
echo "> Processing package: ${line}" && \
dnf -d 10 install -y --downloadonly --downloaddir=${ARCH} ${line} \
--nobest --allowerasing --setopt=install_weak_deps=False; \
done <<<"$(sort -u packages.list)" \
&& echo "Switched to sp3.repos for container-selinux due to gfb.repos dependency issues." \
&& dnf -d 10 --setopt=reposdir=/etc/yum.repos.d.sp3/ install -y --downloadonly --downloaddir=${ARCH} \
&& "socat" "xfsprogs" "ebtables" "iputils" "libseccomp" "device-mapper-libs" "container-selinux" "python3-libselinux" \
--nobest --allowerasing --setopt=install_weak_deps=False \
&& createrepo -d ${ARCH}

FROM scratch
COPY --from=os-kylin-v10gfb /kylin /resources/kylin
21 changes: 21 additions & 0 deletions build/os-packages/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ kylin:
- docker-ce-26.1.2-1.el8
- docker-ce-cli-26.1.2-1.el8

kylin-gfb:
- libselinux-devel
- python3-libselinux
- device-mapper-libs
- nss-tools
- conntrack
- container-selinux
- libseccomp
- chrony
- iputils
- openssl
- curl
- rsync
- socat
- unzip
- e2fsprogs
- xfsprogs
- ebtables
- bash-completion
- tar

# https://download.docker.com/linux/ubuntu/
ubuntu2004:
- containerd.io=1.6.28-1
Expand Down
22 changes: 22 additions & 0 deletions build/os-packages/repos/kylin.gfb.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
###Kylin Linux Advanced Server 10 - os repo###

[ks10-adv-os]
name = Kylin Linux Advanced Server 10 - Os
baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10-GFB/030/os/adv/lic/base/$basearch/
enabled = 1
sslverify=0
gpgcheck = 0

[ks10-adv-updates]
name = Kylin Linux Advanced Server 10 - Updates
baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10-GFB/030/os/adv/lic/updates/$basearch/
enabled = 1
sslverify=0
gpgcheck = 0

[ks10-adv-addons]
name = Kylin Linux Advanced Server 10 - Addons
baseurl = http://update.cs2c.com.cn:8080/NS/V10/V10-GFB/030/os/adv/lic/addons/$basearch/
enabled = 1
sslverify=0
gpgcheck = 0

0 comments on commit e884977

Please sign in to comment.