创建自定义 Docker Alpine 镜像

Isu*_*nga 4 docker alpine-linux

我正在通过安装一些绘图包来创建自定义 Dockerfile。我无法在 Dockerfile 中安装 libgdiplus-dev 包。我尝试在 Dockerfile 中添加镜像 URL https://pkgs.alpinelinux.org/package/edge/testing/armhf/libgdiplus- (可以在此 URL 中找到镜像) dev 但没有帮助。

FROM alpine:3.7  
RUN apk add --no-cache libgdiplus-dev  
Run Code Online (Sandbox Code Playgroud)

运行上面的命令最终我说

libgdiplus-dev (missing):  
required by: world[libgdiplus-dev]
Run Code Online (Sandbox Code Playgroud)

Isu*_*nga 7

找到了。您可以通过提供存储库作为参数来安装任何软件包。

FROM alpine:3.7  
RUN apk add libgdiplus-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
Run Code Online (Sandbox Code Playgroud)