How can I use a local image as the base image with a dockerfile?

 You can use it without doing anything special. If you have a local image called blah you can do FROM blah. If you do FROM blah in your Dockerfile, but don't have a local image called blah, then Docker will try to pull it from the registry.

In other words, if a Dockerfile does FROM ubuntu, but you have a local image called ubuntu different from the official one, your image will override it.

留言

此網誌的熱門文章

Making a Windows 11 hotspot without an internet connection