首页 > 解决方案 > 如何为 FROM 命令生成 docker 映像路径

问题描述

当我从头开始创建 asp.net 核心项目时,Dockerfile 的第一行是:

FROM microsoft/dotnet:2.2-aspnetcore-runtime-stretch-slim AS base

我需要将平台更改为ARM32v7。我检查了 Microsoft 的 Docker Hub,然后我知道我需要使用哪些图像标签:

2.2.3-stretch-slim-arm32v7, 2.2-stretch-slim-arm32v7, 2.2.3, 2.2, latest (Dockerfile)

即使我确实按照以下方式工作,但我不明白如果没有正确的标签名称,它怎么能工作?

FROM microsoft/dotnet:2.2-aspnetcore-runtime-stretch-slim-arm32v7 AS base

我的问题是:如何生成用于 Dockerfile 的 FROM 命令的图像路径?

谢谢你的帮助!

标签: asp.net-coredockerfile

解决方案


FROM microsoft/dotnet:2.2.3-stretch-slim-arm32v7 AS base

推荐阅读