[Question] Build docker images
See original GitHub issueGuys, one question, how you built the images before pushing them on Docker registry? just build the solution on release
mode, tag and push the image?
I have a doubt how to tell docker that takes the aspnetcore
image instead of aspnetcore-build
Thanks in advance.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Image-building best practices
Tips for building images for your application. ... there's an important lesson to learn to help decrease build times for your container images....
Read more >Top 50 Docker Interview Questions and Answers in 2023
This blog features the top DevOps - Docker interview questions and answers ... In other words, Docker images are used to create containers....
Read more >Top Docker Interview Questions and Answers (2023)
Docker Basic Interview Questions · 1. Can you tell something about docker container? · 2. What are docker images? · 3. What is...
Read more >Top 25 Docker Interview Questions and Answers for 2023
Basic Docker Interview Questions for Beginners · 1. What is Docker? · 2. What are Docker's most notable features? · 3. Why should...
Read more >Top 30 Docker Interview Questions & Answers [Updated ...
What is Docker's image? What is a Docker container? What is Docker Swarm? What is Dockerfile used for? How to create Docker container?...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @vany0114 On a multi-stage Dockerfile only one image persists and its generated as a output of the Dockerfile: the one declared in the latest
FROM
.As you can see in our Dockerfiles the latest
FROM
always isFROM base as XXX
andbase
image is the one created frommicrosoft/aspnetcore:2.0.5
. But of course, this is up to you 😃Yeah, you can do so for dev/test environments, directly from your PC. But in a real project, that should be done by your CI/CD pipelines like when using VSTS, like we have for eShopOnContainers, so the push to Docker Hub is performed by the CI pipeline. About the base image, take into account that we’re using Docker Multi-Stage build, so the base image for most of our containers is always
microsoft/aspnetcore
, notaspnetcore-build
which is only used by Docker when compiling the .NET project and when building the Docker image with the Docker Multi-Stage Build dockerfiles. This is one example of one of our dockerfiles using Docker Multi-Stage Build: https://github.com/dotnet-architecture/eShopOnContainers/blob/dev/src/Services/Catalog/Catalog.API/DockerfileFor more info on Docker Multi-Stage Build, see: https://docs.microsoft.com/en-us/dotnet/core/docker/building-net-docker-images https://docs.docker.com/develop/develop-images/multistage-build/
Docker Multi-Stage Build is new for .NET Core images since late 2017, btw.