From 98545d1e268471c6bbe21e75bf3c08faf8b77792 Mon Sep 17 00:00:00 2001 From: Endial Fang Date: Fri, 4 Aug 2023 15:05:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=20Dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index c267539..4c0b6d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ # 该部分变量,在编译命令中通过 `--build-arg` 传入;如果未设置,则使用下面对应的默认值 # 设置当前应用名称及版本 -ARG APP_NAME=dBuilder +ARG APP_NAME=dbuilder ARG APP_VER=12 # 设置默认仓库地址,默认为本地仓库;定义时需要包含末尾的`/` @@ -36,21 +36,14 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} ${REGISTRY_URL}colovu/debian:${AP # 声明需要使用的全局可变参数 ARG APP_NAME ARG APP_VER -ARG REGISTRY_URL ARG APT_SOURCE -ARG LOCAL_URL -ARG TARGETARCH LABEL \ "Version"="v${APP_VER}" \ "Description"="Docker image for Builder based on Debian." \ - "Github"="https://github.com/colovu/docker-dbuilder" \ + "Github"="https://github.com/colovu/docker-${APP_NAME}" \ "Vendor"="Endial Fang (endial@126.com)" - -# 选择软件包源(Optional),以加速后续软件包安装 -RUN select_source ${APT_SOURCE} - # 以下命令安装的软件包 # apt-transport-https apt-utils binutils binutils-common # binutils-x86-64-linux-gnu build-essential bzip2 ca-certificates cmake @@ -72,9 +65,16 @@ RUN select_source ${APT_SOURCE} # patch perl perl-modules-5.28 pinentry-curses pkg-config procps python3 # python3-minimal python3.7 python3.7-minimal readline-common sudo wget # xz-utils -RUN install_pkg sudo wget curl git ca-certificates iproute2 net-tools nano dpkg gnupg \ +RUN set -eux; \ + \ + # 选择软件包源 + select_source ${APT_SOURCE}; \ + \ + # 安装编译环境及常用开发库 + install_pkg sudo wget git ca-certificates iproute2 net-tools nano dpkg gnupg \ dirmngr apt-utils apt-transport-https lsb-release iputils-ping \ - build-essential cmake libcmocka-dev pkg-config libssl3 libssl-dev \ - libtool libltdl7 libltdl-dev + build-essential cmake libcmocka-dev pkg-config \ + libssl3 libssl-dev \ + libtool libltdl7 libltdl-dev; CMD []