From 872d38c1af8df5c8457eadd27eb89be17e7a7089 Mon Sep 17 00:00:00 2001 From: Hanqing Wu Date: Thu, 6 Jul 2023 20:06:18 +0800 Subject: [PATCH] fix make curvebs image Signed-off-by: Hanqing Wu --- docker/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7a20760a5b..0901792442 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,8 +4,12 @@ RUN mkdir -p /curvebs /etc/curve /etc/nebd /core /curve/init.d/ COPY curvebs /curvebs COPY entrypoint.sh / COPY curvebs/tools/sbin/curve_ops_tool curvebs/nbd/sbin/curve-nbd /usr/bin/ -RUN ([ -f /curvebs/curvebs_tgt.deb ] && dpkg -i /curvebs/curvebs_tgt.deb && rm /curvebs/curvebs_tgt.deb) \ +RUN (([ -f /curvebs/curvebs_tgt.deb ] && dpkg -i /curvebs/curvebs_tgt.deb && rm /curvebs/curvebs_tgt.deb) || true) \ && mv /curvebs/lib /usr/lib/nebd \ && chmod a+x /entrypoint.sh \ - && apt update && apt install -y kmod -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file + && mv /etc/apt/sources.list /etc/apt/sources.list.save \ + && echo "deb http://mirrors.163.com/debian-archive/debian stretch main contrib non-free" > /etc/apt/sources.list \ + && apt-get update && apt install -y kmod \ + && rm -rf /var/lib/apt/lists/* + +ENTRYPOINT ["/entrypoint.sh"]