Slightly simplify the build
This commit is contained in:
@@ -15,17 +15,18 @@ RUN mkdir -p "/out/rootfs"
|
||||
COPY packages/alpine-minirootfs-${ALPINE_VER}-${ALPINE_ARCH}.tar.gz ./alpine.tar.gz
|
||||
COPY packages/${CRIO_VERSION}.tar.gz ./crio.tar.gz
|
||||
COPY out/board.itb ./
|
||||
COPY out/rootfs ./rootfs
|
||||
COPY out/rootfs.tar.gz ./rootfs.tar.gz
|
||||
COPY out/${DEVICE_TREE_TARGET}.dtb ./
|
||||
COPY out/Image.gz ./
|
||||
|
||||
RUN tar -xf alpine.tar.gz -C "/out/rootfs"
|
||||
RUN tar zxf rootfs.tar.gz -C "/out"
|
||||
RUN tar zxf alpine.tar.gz -C "/out/rootfs"
|
||||
|
||||
RUN mkdir -p /out/rootfs/usr/local/bin/
|
||||
COPY packages/kubernetes/kubelet-${KUBE_VERSION} /out/rootfs/usr/local/bin/kubelet
|
||||
COPY packages/kubernetes/kubeadm-${KUBE_VERSION} /out/rootfs/usr/local/bin/kubeadm
|
||||
COPY packages/kubernetes/kubectl-${KUBE_VERSION} /out/rootfs/usr/local/bin/kubectl
|
||||
COPY clitools/bin/ctl-linux-${ALPINE_ARCH}-${TAG} /out/rootfs/usr/local/bin/ctl
|
||||
# COPY clitools/bin/ctl-linux-${ALPINE_ARCH}-${TAG} /out/rootfs/usr/local/bin/ctl
|
||||
RUN chmod +x /out/rootfs/usr/local/bin/*
|
||||
|
||||
COPY alpine/rootfs-extra ./rootfs-extra
|
||||
|
||||
@@ -21,6 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
flex \
|
||||
git \
|
||||
gettext-base \
|
||||
jq \
|
||||
kmod \
|
||||
libelf-dev \
|
||||
libssl-dev \
|
||||
|
||||
@@ -47,6 +47,7 @@ RUN depmod -b /out/rootfs $(ls /out/rootfs/lib/modules/)
|
||||
|
||||
RUN find /out/kernel -name "${DEVICE_TREE_TARGET}.dtb" -exec cp {} /out/ \;
|
||||
RUN test -f "/out/${DEVICE_TREE_TARGET}.dtb"
|
||||
RUN cd /out && tar zcf rootfs.tar.gz rootfs
|
||||
|
||||
FROM scratch
|
||||
ARG DEVICE_TREE_TARGET
|
||||
@@ -57,4 +58,4 @@ COPY --from=build \
|
||||
/out/kernel/Image.gz \
|
||||
/out/${DEVICE_TREE_TARGET}.dtb \
|
||||
./
|
||||
COPY --from=build /out/rootfs/ ./rootfs
|
||||
COPY --from=build /out/rootfs.tar.gz ./rootfs.tar.gz
|
||||
|
||||
Reference in New Issue
Block a user