feat: 优化Dockerfile
This commit is contained in:
+8
-5
@@ -35,20 +35,23 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} ${REGISTRY_URL}colovu/alpine:${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 Alpine." \
|
||||
"Github"="https://github.com/colovu/docker-abuilder" \
|
||||
"Github"="https://github.com/colovu/docker-${APP_NAME}" \
|
||||
"Vendor"="Endial Fang (endial@126.com)"
|
||||
|
||||
# 说明:
|
||||
# 虽然原始镜像包含 wget, 但该版本存在问题,下载部分资源(如redis)会报错,因此安装官方完整版
|
||||
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 \
|
||||
dpkg-dev bash build-base cmake pkgconf \
|
||||
linux-headers cmocka-dev openssl-dev
|
||||
|
||||
|
||||
Reference in New Issue
Block a user