容器安全-镜像改造
- One minute read - 75 words基于安全基础镜像(distroless/alpine/ubi)改造开源组件基础镜像
1 安全基础镜像
- 开源基础镜像
- 自研基础镜像
2 镜像改造
2.1 基于alpine的镜像改造
2.1.1 常见问题及解决方式
- apk 替换软件源
# Dockerfile 添加 RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
- pip 安装依赖过程中遇到
Problem with the CMake installation, aborting build. CMake executable is cmake
apk --no-cache add cmake
- pip 安装依赖过程中遇到
./bootstrap.sh: line 2: autoreconf: not found
apk --no-cache add autoconf
- pip 安装依赖过程中遇到
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326
apk --no-cache add automake