Skip to content

Commit

Permalink
Main update ci 20240319 (#589)
Browse files Browse the repository at this point in the history
* update driver ci

* update ci

* update kmod ci

* ci: update 1.7* kmod release artifacts name format
kulukami authored Mar 27, 2024

Verified

This commit was signed with the committer’s verified signature.
Saelmala Sandra Larsson
1 parent 6003e21 commit c037550
Showing 59 changed files with 947 additions and 405 deletions.
402 changes: 244 additions & 158 deletions .github/workflows/Elkeid_driver_build.yml

Large diffs are not rendered by default.

429 changes: 264 additions & 165 deletions .github/workflows/Elkeid_driver_release.yml

Large diffs are not rendered by default.

79 changes: 53 additions & 26 deletions driver/build_script/gen_ci_from_dockerfiles.py
Original file line number Diff line number Diff line change
@@ -7,7 +7,10 @@
all_dockers_aarch64 = os.listdir(
"driver/dockerfiles.aarch64")

black_list = []
black_list = [
"ubuntu1604-k410",
"ubuntu1604-k48",
]
white_list = []

all_vms = []
@@ -25,12 +28,12 @@ def gen_job(vminfo):
some_data = OrderedDict(
{
"runs-on": runs_on,
"continue-on-error": "true",
"continue-on-error": True,
"steps": [
OrderedDict({
"uses": "actions/checkout@v3",
"with": {
"submodules": "false"
"submodules": False
}
}),
OrderedDict({
@@ -43,19 +46,19 @@ def gen_job(vminfo):
}),
OrderedDict({
"name": "Set up Docker Buildx "+vmname,
"uses": "docker/setup-buildx-action@v2",
"uses": "docker/setup-buildx-action@v3",
"with": {
"config": "/etc/buildkitd.toml",
}
}) if aarch.endswith("aarch64") else OrderedDict({
"name": "Set up Docker Buildx "+vmname,
"uses": "docker/setup-buildx-action@v2"
"uses": "docker/setup-buildx-action@v3"
}),

OrderedDict({
"name": "Build "+vmname,
"uses": "docker/build-push-action@v3",
"timeout-minutes": "300",
"timeout-minutes": 420,
"with": {
"context": ".",
"file": dockerpath + "/Dockerfile."+vmname,
@@ -118,19 +121,19 @@ def gen_job(vminfo):
"on": {
"push": {
"paths":[
"'.github/workflows/Elkeid_driver_build.yml'",
"'.github/workflows/Elkeid_driver_release.yml'",
"'driver/LKM/**'",
"'driver/build_script/aarch64/**'",
"'driver/build_script/x86_64/**'",
"'driver/dockerfiles.aarch64/**'",
"'driver/dockerfiles.x86_64/**'",
".github/workflows/Elkeid_driver_build.yml",
".github/workflows/Elkeid_driver_release.yml",
"driver/LKM/**",
"driver/build_script/aarch64/**",
"driver/build_script/x86_64/**",
"driver/dockerfiles.aarch64/**",
"driver/dockerfiles.x86_64/**",
],
"branches": [
"main",
]
},
"schedule": ["cron : '0 3 1 * *'"]
"schedule": [{"cron":"0 3 1 * *"}]
}
}
)
@@ -141,7 +144,7 @@ def gen_job(vminfo):
"on": {
"push": {
"tags": [
"'v*'"
"v*"
]
},
}
@@ -168,6 +171,24 @@ def gen_job(vminfo):
"prerelease": False,
}
}),
OrderedDict({
"uses": "actions/checkout@v3",
"with": {
"submodules": False
}
}),
OrderedDict({
"name": "Setup Version",
"run": 'echo "KMOD_VERSION=$(cat driver/LKM/src/init.c | grep MODULE_VERSION | awk -F \'\"\' \'{print $2}\')" >> "$GITHUB_ENV"'
}),
OrderedDict({
"name": "Setup output Version format",
"run": 'echo "KMOD_RELEASE_PREFIX=$(echo $KMOD_VERSION | sed -e "s|\\.|\\_|g")" >> "$GITHUB_ENV"'
}),
OrderedDict({
"name": "Setup output Version format",
"run": 'echo "KO_TAR_XZ=\"$KMOD_RELEASE_PREFIX\"_elkeid_driver_ko_$(date +\"%Y%m%d\").tar.xz" >> "$GITHUB_ENV"'
}),
OrderedDict({
"uses": "actions/download-artifact@v3",
"with": {
@@ -182,22 +203,22 @@ def gen_job(vminfo):

OrderedDict({
"name": "Prepare artifact 2-1 ko",
"run": "BUILD_VERSION=$(cat LKM/src/init.c | grep MODULE_VERSION | awk -F '\"' '{print $2}') mv -f ~/all_elkeid_drivers/*/*$BUILD_VERSION*.ko elkeid_driver/ko || true"
"run": "mv -f ~/all_elkeid_drivers/*/*$KMOD_VERSION*.ko elkeid_driver/ko || true"
}),

OrderedDict({
"name": "Prepare artifact 2-2 sign",
"run": "BUILD_VERSION=$(cat LKM/src/init.c | grep MODULE_VERSION | awk -F '\"' '{print $2}') mv -f ~/all_elkeid_drivers/*/*$BUILD_VERSION*.sign elkeid_driver/ko || true"
"run": "mv -f ~/all_elkeid_drivers/*/*$KMOD_VERSION*.sign elkeid_driver/ko || true"
}),

OrderedDict({
"name": "Prepare artifact 2-3 log",
"run": "BUILD_VERSION=$(cat LKM/src/init.c | grep MODULE_VERSION | awk -F '\"' '{print $2}') mv -f ~/all_elkeid_drivers/*/*$BUILD_VERSION*.log elkeid_driver/log || true"
"run": "mv -f ~/all_elkeid_drivers/*/*$KMOD_VERSION*.log elkeid_driver/log || true"
}),

OrderedDict({
"name": "Pack artifact",
"run": "tar -C elkeid_driver -cJf elkeid_driver_ko.tar.xz ko"
"run": "tar -C elkeid_driver -cJf \"$KO_TAR_XZ\" ko"
}),

OrderedDict({
@@ -221,16 +242,16 @@ def gen_job(vminfo):
}),

OrderedDict({
"name": "Upload Release Asset ",
"name": "Upload Release Asset",
"id": "upload-release-asset",
"uses": "actions/upload-release-asset@v1",
"env": {
"GITHUB_TOKEN": "${{secrets.GITHUB_TOKEN}}"
},
"with": {
"upload_url": "${{steps.create_release.outputs.upload_url}}",
"asset_path": "./elkeid_driver_ko.tar.xz",
"asset_name": "elkeid_driver_ko.tar.xz",
"asset_path": "${{env.KO_TAR_XZ}}",
"asset_name": "${{env.KO_TAR_XZ}}",
"asset_content_type": "application/x-tar"
},
})
@@ -280,11 +301,17 @@ def setup_yaml():
setup_yaml()

with open(".github/workflows/Elkeid_driver_build.yml", "w") as f:
config_data = yaml.dump(yaml_cfg_build, default_flow_style=False)
config_data = config_data.replace("'", "")
config_data = yaml.dump(yaml_cfg_build,
default_style=None,
default_flow_style=False)
config_data = config_data.replace("'on'", "on")
config_data = config_data.replace("'[self-hosted,linux,ARM64]'", "[self-hosted,linux,ARM64]")
f.write(config_data)

with open(".github/workflows/Elkeid_driver_release.yml", "w") as f:
config_data = yaml.dump(yaml_cfg_release, default_flow_style=False)
config_data = config_data.replace("'", "")
config_data = yaml.dump(yaml_cfg_release,
default_style=None,
default_flow_style=False)
config_data = config_data.replace("'on'", "on")
config_data = config_data.replace("'[self-hosted,linux,ARM64]'", "[self-hosted,linux,ARM64]")
f.write(config_data)
6 changes: 4 additions & 2 deletions driver/dockerfiles.aarch64/Dockerfile.rhel8
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
FROM arm64v8/oraclelinux:8 AS rhel8


RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel yumdownloader gnutls-utils pciutils-libs;
RUN dnf install -y wget perl gcc make tree elfutils-libelf-devel openssl-devel openssl;
RUN dnf groupinstall -y "Development Tools";

RUN dnf install -y centos-release-scl
RUN dnf install -y devtoolset-8

RUN rm -rf /root/headers || true
RUN mkdir /root/headers

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/aarch64/batch_compile_el7.sh
RUN bash ./build_script/aarch64/batch_compile_el8.sh
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.aliyun_linux2
Original file line number Diff line number Diff line change
@@ -12,4 +12,9 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN dnf remove -y kernel-devel || true


FROM kulukami/aliyun_linux2:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.aliyun_linux3
Original file line number Diff line number Diff line change
@@ -13,4 +13,9 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN dnf remove -y kernel-devel || true


FROM kulukami/aliyun_linux3:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.almalinux8
Original file line number Diff line number Diff line change
@@ -25,3 +25,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM almalinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.almalinux9
Original file line number Diff line number Diff line change
@@ -23,4 +23,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM almalinux/9-base
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux1
Original file line number Diff line number Diff line change
@@ -11,4 +11,10 @@ RUN rm -f /root/kernel-devel-*amzn1.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:1
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux2
Original file line number Diff line number Diff line change
@@ -11,4 +11,10 @@ RUN rm -f /root/kernel-devel-*amzn2.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:2
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux2_510
Original file line number Diff line number Diff line change
@@ -12,4 +12,10 @@ RUN rm -f /root/kernel-devel-*amzn2.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:1
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.amazonlinux2_54
Original file line number Diff line number Diff line change
@@ -12,4 +12,10 @@ RUN rm -f /root/kernel-devel-*amzn2.x86_64.rpm

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN yum remove -y kernel-devel || true


FROM amazonlinux:2
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.anolis8
Original file line number Diff line number Diff line change
@@ -25,3 +25,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM almalinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.debian10
Original file line number Diff line number Diff line change
@@ -16,4 +16,10 @@ RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true


FROM debian:buster
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.debian11
Original file line number Diff line number Diff line change
@@ -12,4 +12,10 @@ RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true


FROM debian:bullseye
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
20 changes: 13 additions & 7 deletions driver/dockerfiles.x86_64/Dockerfile.debian8
Original file line number Diff line number Diff line change
@@ -13,15 +13,21 @@ RUN apt install --yes --force-yes gcc build-essential libelf-dev;
RUN apt install --yes --force-yes linux-compiler-gcc* || true
RUN apt install --yes --force-yes linux-kbuild*;
RUN apt install --yes --force-yes \
linux-headers-4.9.0-0.bpo.12-all-amd64 \
linux-headers-4.9.0-0.bpo.11-all-amd64 \
linux-headers-4.9-amd64 \
linux-headers-3.16.0-6-all-amd64 \
linux-headers-3.16.0-11-amd64 \
linux-headers-amd64 || true
linux-headers-4.9.0-0.bpo.12-all-amd64 \
linux-headers-4.9.0-0.bpo.11-all-amd64 \
linux-headers-4.9-amd64 \
linux-headers-3.16.0-6-all-amd64 \
linux-headers-3.16.0-11-amd64 \
linux-headers-amd64 || true



ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true


FROM debian:jessie
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
11 changes: 8 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.debian9
Original file line number Diff line number Diff line change
@@ -7,8 +7,8 @@ RUN sed -i '/deb.debian.org/s/^/#/g' /etc/apt/sources.list

RUN echo "deb http://snapshot.debian.org/archive/debian/20220622T000000Z stretch-backports main" >> /etc/apt/sources.list


RUN apt-get -o Acquire::Check-Valid-Until=false update
RUN rm -rf /var/lib/apt/lists/partial
RUN apt-get -o Acquire::Check-Valid-Until=false -o Acquire::CompressionTypes::Order::=gz update
RUN apt-get -o Acquire::Check-Valid-Until=false install -y apt-utils apt-transport-https ca-certificates debian-archive-keyring wget curl
RUN apt-get -o Acquire::Check-Valid-Until=false install -y gcc build-essential libelf-dev;
RUN apt-get -o Acquire::Check-Valid-Until=false install -y linux-compiler-gcc* || true
@@ -25,4 +25,9 @@ RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true

FROM debian:stretch
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ol8_uek
Original file line number Diff line number Diff line change
@@ -14,4 +14,10 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_ol8_uek.sh
RUN rm -rf /root/headers/*.rpm
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-uek-devel || true


FROM oraclelinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel6
Original file line number Diff line number Diff line change
@@ -21,3 +21,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*
RUN yum remove -y kernel-devel || true


FROM centos:centos6
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
12 changes: 9 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.rhel6_elrepo
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@ FROM centos:centos6 AS rhel6

RUN rm -f /etc/yum.repos.d/CentOS-Media.repo
RUN sed -e "s|^mirrorlist=|#mirrorlist=|g" \
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://mirrors.aliyun.com/centos-vault/6.10|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
-e "s|^#baseurl=http://mirror.centos.org/centos/\$releasever|baseurl=https://mirrors.aliyun.com/centos-vault/6.10|g" \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo

RUN yum install -y wget perl gcc make tree elfutils-libelf-devel unzip yum-utils;
RUN yum groupinstall -y "Development Tools";
@@ -14,3 +14,9 @@ RUN yum groupinstall -y "Development Tools";
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_elrepo6.sh
RUN yum remove -y kernel-devel || true


FROM centos:centos6
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7
Original file line number Diff line number Diff line change
@@ -13,3 +13,9 @@ RUN mkdir /root/headers
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_el7.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_centosplus
Original file line number Diff line number Diff line change
@@ -13,3 +13,9 @@ RUN mkdir /root/headers
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_el7_centosplus.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_lt
Original file line number Diff line number Diff line change
@@ -13,3 +13,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_lt.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_lt_archive
Original file line number Diff line number Diff line change
@@ -13,3 +13,8 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_lt_archive.sh
RUN yum remove -y kernel-devel || true

FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_ml
Original file line number Diff line number Diff line change
@@ -13,3 +13,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_ml.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel7_elrepo_ml_archive
Original file line number Diff line number Diff line change
@@ -13,3 +13,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo7_ml_archive.sh
RUN yum remove -y kernel-devel || true


FROM cern/cc7-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 6 additions & 2 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8
Original file line number Diff line number Diff line change
@@ -6,14 +6,18 @@ RUN rm -rf /root/headers || true
RUN mkdir /root/headers

RUN for eachversion in `dnf --showduplicates list kernel-devel | grep kernel-devel.x86_64 | awk '{print $2}'` ; do dnf download --downloaddir=/root/headers kernel-devel-$eachversion.x86_64 || true ; done;
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'http://repos-va.psychz.net/centos/8-stream/BaseOS/x86_64/os/Packages/'
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.tuna.tsinghua.edu.cn/centos/8-stream/BaseOS/x86_64/os/Packages/'
RUN wget -q -k -e robots=off -c -r -np -nd -nH -A 'kernel-devel*x86_64.rpm' 'https://mirrors.tuna.tsinghua.edu.cn/centos/8-stream/BaseOS/x86_64/os/Packages/' || true

RUN rpm --force -i /root/headers/*.rpm || true

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true



FROM oraclelinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_elrepo_lt
Original file line number Diff line number Diff line change
@@ -10,3 +10,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo8_lt.sh

RUN yum remove -y kernel-devel || true

FROM cern/c8-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 6 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_elrepo_ml
Original file line number Diff line number Diff line change
@@ -10,3 +10,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver

RUN bash ./build_script/x86_64/batch_compile_elrepo8_ml.sh
RUN yum remove -y kernel-devel || true


FROM cern/c8-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rhel8_plus
Original file line number Diff line number Diff line change
@@ -13,5 +13,10 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_el8_plus.sh
RUN rm -rf /root/headers/*.rpm
RUN yum remove -y kernel-devel || true



FROM cern/c8-base:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
4 changes: 4 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.rocky8
Original file line number Diff line number Diff line change
@@ -24,4 +24,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm

RUN yum remove -y kernel-devel || true

FROM rockylinux:8
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.rocky9
Original file line number Diff line number Diff line change
@@ -26,4 +26,10 @@ RUN rpm --force -i /root/headers/*.rpm || true
ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN rm -rf /root/headers/*.rpm
RUN rm -rf /root/headers/*.rpm
RUN dnf remove -y kernel-devel || true


FROM rockylinux:9
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
11 changes: 9 additions & 2 deletions driver/dockerfiles.x86_64/Dockerfile.tlinux24
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
FROM tencentos/tencentos_server24:latest AS tlinux24
CMD [ "sh", "-c", "echo start" ]

RUN yum install -y wget perl gcc make tree elfutils-libelf-devel yumdownloader;
RUN yum install -y wget perl gcc make tree elfutils-libelf-devel;
RUN yum groupinstall -y "Development Tools";

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_tencentos.sh
RUN bash ./build_script/x86_64/batch_compile_tencentos.sh

RUN yum remove -y kernel-devel || true


FROM tencentos/tencentos_server24:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
8 changes: 7 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.tlinux31
Original file line number Diff line number Diff line change
@@ -6,4 +6,10 @@ RUN yum groupinstall -y "Development Tools";

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile_tencentos.sh
RUN bash ./build_script/x86_64/batch_compile_tencentos.sh

RUN yum remove -y kernel-devel || true

FROM tencentos/tencentos_server31:latest
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
19 changes: 12 additions & 7 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1204
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:precise AS precise

RUN echo 'deb http://old-releases.ubuntu.com/ubuntu/ precise main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse \n\
\n\
' > /etc/apt/sources.list;
deb http://old-releases.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-proposed main restricted universe multiverse \n\
deb http://old-releases.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse \n\
\n\
' > /etc/apt/sources.list;

RUN apt-get update;
RUN apt-get install -y gcc build-essential dkms git wget python-pip python-requests || true;
@@ -24,4 +24,9 @@ RUN dpkg -i ./*.deb || true
RUN rm -f ./*.deb || true

WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get remove -y linux-headers* || true

FROM ubuntu:precise
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
4 changes: 4 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1404_k3
Original file line number Diff line number Diff line change
@@ -27,5 +27,9 @@ RUN apt-get -y install linux-headers-3.19.*-generic || true
RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get -y remove linux-headers-3.19.*-generic || true

RUN apt-get remove -y linux-headers* || true


FROM ubuntu:trusty
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
4 changes: 4 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1404_k4
Original file line number Diff line number Diff line change
@@ -33,5 +33,9 @@ RUN apt-get -y install linux-headers-4.15.*-generic || true

RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get -y remove linux-headers-4.15.*-generic || true
RUN apt-get remove -y linux-headers* || true


FROM ubuntu:trusty
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_auzre
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-azure || true
RUN apt-get remove -y linux-headers* || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_aws
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-aws || true
RUN apt-get remove -y linux-headers* || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_gcp
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-gcp || true
RUN apt-get remove -y linux-headers* || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_gke
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-gke || true
RUN apt-get remove -y linux-headers* || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 5 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_k410
Original file line number Diff line number Diff line change
@@ -12,4 +12,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-4.10.*-generic || true
RUN apt-get -y remove linux-headers-4.11.*-generic || true
RUN apt-get -y remove linux-headers-4.11.*-generic || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 5 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_k413
Original file line number Diff line number Diff line change
@@ -12,4 +12,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-4.13.*-generic || true
RUN apt-get -y remove linux-headers-4.15.*-generic linux-headers-generic-hwe-16.04* || true
RUN apt-get -y remove linux-headers-4.15.*-generic linux-headers-generic-hwe-16.04* || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
7 changes: 6 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_k44
Original file line number Diff line number Diff line change
@@ -9,4 +9,9 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-4.4.*-generic || true
RUN apt-get -y remove linux-headers-4.4.*-generic || true


FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 5 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ubuntu1604_k48
Original file line number Diff line number Diff line change
@@ -9,4 +9,8 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-4.8.*-generic || true
RUN apt-get -y remove linux-headers-4.8.*-generic || true

FROM ubuntu:xenial
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1804
Original file line number Diff line number Diff line change
@@ -27,3 +27,8 @@ RUN bash ./build_script/x86_64/batch_compile.sh
RUN apt-get -y remove linux-headers-4.15.*-generic || true
RUN apt-get -y remove linux-headers-4.18.*-generic || true
RUN apt-get -y remove build-essential dkms;


FROM ubuntu:bionic
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
11 changes: 8 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1804_aws
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:bionic AS bionic_aws

RUN echo 'deb http://archive.ubuntu.com/ubuntu/ bionic main \n\
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;

RUN apt update;
RUN apt install -y gcc build-essential dkms;
@@ -15,3 +15,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-aws || true


FROM ubuntu:bionic
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
11 changes: 8 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1804_azure
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:bionic AS bionic_azure

RUN echo 'deb http://archive.ubuntu.com/ubuntu/ bionic main \n\
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;

RUN apt update;
RUN apt install -y gcc build-essential dkms;
@@ -15,3 +15,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-azure || true


FROM ubuntu:bionic
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
11 changes: 8 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1804_gcp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:bionic AS bionic_gcp

RUN echo 'deb http://archive.ubuntu.com/ubuntu/ bionic main \n\
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;

RUN apt update;
RUN apt install -y gcc build-essential dkms;
@@ -15,3 +15,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-gcp || true


FROM ubuntu:bionic
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
10 changes: 7 additions & 3 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu1804_gke
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:bionic AS bionic_gke

RUN echo 'deb http://archive.ubuntu.com/ubuntu/ bionic main \n\
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;
deb http://archive.ubuntu.com/ubuntu bionic-updates main\n\
deb http://security.ubuntu.com/ubuntu bionic-security main\n\
' > /etc/apt/sources.list;

RUN apt update;
RUN apt install -y gcc build-essential dkms;
@@ -15,3 +15,7 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-gke || true

FROM ubuntu:bionic
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
6 changes: 5 additions & 1 deletion driver/dockerfiles.x86_64/Dockerfile.ubuntu2004
Original file line number Diff line number Diff line change
@@ -14,4 +14,8 @@ ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-generic linux-hwe-*-headers-* || true
RUN apt-get -y remove linux-headers-*-generic linux-hwe-*-headers-* || true

FROM ubuntu:focal
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2004_aws
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-aws || true


FROM ubuntu:focal
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2004_azure
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-azure || true


FROM ubuntu:focal
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2004_gcp
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-gcp || true


FROM ubuntu:focal
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
5 changes: 5 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2004_gke
Original file line number Diff line number Diff line change
@@ -10,3 +10,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-gke || true


FROM ubuntu:focal
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
9 changes: 5 additions & 4 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@ FROM ubuntu:jammy AS jammy
RUN apt update;
RUN apt install -y wget curl tree git gcc build-essential kbuild libelf-dev;
RUN apt-get -y install linux-headers-*-generic || true
RUN apt-get -y install linux-headers-*-aws || true
RUN apt-get -y install linux-headers-*-azure || true

RUN apt clean all

@@ -13,5 +11,8 @@ WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-generic || true
RUN apt-get -y remove linux-headers-*-aws || true
RUN apt-get -y remove linux-headers-*-azure || true


FROM ubuntu:jammy
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
20 changes: 20 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2204_aws
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

FROM ubuntu:jammy AS jammy

RUN apt update;
RUN apt install -y wget curl tree git gcc build-essential kbuild libelf-dev;
RUN apt-get -y install linux-headers || true
RUN apt-get -y install linux-headers-*-aws || true

RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-aws || true


FROM ubuntu:jammy
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
18 changes: 18 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2204_azure
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:jammy AS jammy

RUN apt update;
RUN apt install -y wget curl tree git gcc build-essential kbuild libelf-dev;
RUN apt-get -y install linux-headers || true
RUN apt-get -y install linux-headers-*-azure || true

RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-azure || true

FROM ubuntu:jammy
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]
20 changes: 20 additions & 0 deletions driver/dockerfiles.x86_64/Dockerfile.ubuntu2204_gcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM ubuntu:jammy AS jammy

RUN apt update;
RUN apt install -y wget curl tree git gcc build-essential kbuild libelf-dev;
RUN apt-get -y install linux-headers || true
RUN apt-get -y install linux-headers-*-gcp || true

RUN apt clean all

ADD . /elkeid
WORKDIR /elkeid/driver
RUN bash ./build_script/x86_64/batch_compile.sh

RUN apt-get -y remove linux-headers-*-generic || true
RUN apt-get -y remove linux-headers-*-gcp || true


FROM ubuntu:jammy
COPY --from=0 /ko_output /ko_output
CMD [ "sh", "-c", "echo start" ]

0 comments on commit c037550

Please sign in to comment.