File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ ARG COREOS_RELEASE_CHANNEL=stable
1111ARG COREOS_VERSION
1212ARG NVIDIA_DRIVER_VERSION
1313ARG KERNEL_VERSION
14+ ARG KERNEL_TAG
1415
1516ENV KERNEL_PATH /usr/src/kernels/linux
1617ENV KERNEL_NAME ${KERNEL_VERSION}-coreos
@@ -20,15 +21,15 @@ ENV COREOS_RELEASE_URL https://${COREOS_RELEASE_CHANNEL}.release.core-os.net/amd
2021RUN git clone ${KERNEL_REPOSITORY} \
2122 --single-branch \
2223 --depth 1 \
23- --branch v${KERNEL_VERSION } \
24+ --branch v${KERNEL_TAG } \
2425 ${KERNEL_PATH}
2526
2627WORKDIR ${KERNEL_PATH}
2728
28- RUN git checkout -b stable v${KERNEL_VERSION } && rm -rf .git
29+ RUN git checkout -b stable v${KERNEL_TAG } && rm -rf .git
2930RUN curl ${COREOS_RELEASE_URL}/coreos_developer_container.bin.bz2 | \
3031 bzip2 -d > /tmp/coreos_developer_container.bin
31- RUN 7z e /tmp/coreos_developer_container.bin "usr/lib64/modules/*-coreos/build/.config"
32+ RUN 7z e /tmp/coreos_developer_container.bin "usr/lib64/modules/*-coreos* /build/.config"
3233RUN make modules_prepare
3334RUN sed -i -e "s/${KERNEL_VERSION}/${KERNEL_NAME}/" include/generated/utsrelease.h
3435
Original file line number Diff line number Diff line change 2828# the CoreOS release feed.
2929KERNEL_VERSION = $(shell \
3030 curl -s ${COREOS_RELEASES_URL} | \
31- jq -r .[\"${COREOS_VERSION}\"].major_software.kernel[0] | \
32- sed -e 's/\(\.0\) *$$//g')
31+ jq -r .[\"${COREOS_VERSION}\"].major_software.kernel[0])
32+
33+ KERNEL_TAG := $(shell echo ${KERNEL_VERSION} | sed -e 's/\(\.0\) *$$//g')
3334
3435# Environment
3536WORKDIR := $(PWD )
@@ -75,6 +76,7 @@ build: validate
7576 --build-arg COREOS_VERSION=$(COREOS_VERSION ) \
7677 --build-arg NVIDIA_DRIVER_VERSION=$(NVIDIA_DRIVER_VERSION ) \
7778 --build-arg KERNEL_VERSION=$(KERNEL_VERSION ) \
79+ --build-arg KERNEL_TAG=$(KERNEL_TAG ) \
7880 --tag $(DOCKER_REGISTRY ) /$(DOCKER_ORG ) /$(DOCKER_REPOSITORY ) :$(COREOS_VERSION ) \
7981 --file $(WORKDIR ) /Dockerfile . \
8082
You can’t perform that action at this time.
0 commit comments