Docker Community Forums

Share and learn in the Docker community.

How to get the ’from‘ field information of the multi-stage construction of the mirror, through the docker client

such as:

dockerfile:

FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
# copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out

# build runtime image
FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "aspnetapp.dll"]

i want get froms[microsoft/aspnetcore-build:2.0 AS build-env, microsoft/aspnetcore:2.0]

Hi. Where do you want to get that?
If it is from within the container, i believe it is not possible.

similar to the docker inspect command, or other docker commands.
In short, I want to get through the mirror information。

Amazon SageMaker Processing runs your processing container image in a similar way as the following command, where AppSpecification.ImageUri is the Amazon ECR image URI that you specify in a CreateProcessingJob operation.

docker run [AppSpecification.ImageUri]
This command runs the ENTRYPOINT command configured in your Docker image.

You can also override the entrypoint command in the image or give command-line arguments to your entrypoint command using the AppSpecification.ContainerEntrypoint and AppSpecification.ContainerArgument parameters in your CreateProcessingJob request. Specifying these parameters configures Amazon SageMaker Processing to run the container similar to the way that the following command does.

docker run --entry-point [AppSpecification.ContainerEntrypoint] [AppSpecification.ImageUri] [AppSpecification.ContainerArguments]
For example, if you specify the ContainerEntrypoint to be [python3, -v, /processing_script.py] in your CreateProcessingJob request, and ContainerArguments to be [data-format, csv], Amazon SageMaker Processing runs your container with the following command.

python3 -v /processing_script.py data-format csv