forked from kubean-io/kubean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
- Loading branch information
Showing
4 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |