Pinaki Mukherjee
Pinaki Mukherjee

Reputation: 1656

Docker From command Dockerfile

I have a very basic question regarding Docker FROM field. It's not clearly mentioned but based on my understanding it looks like if we use FROM FEDORA in Fedora, then docker will download the whole fedora base image in default location. So if I am using Fedora OS, will there be any advantage using FROM FEDORA instead of FROM UBUNTU in dockerfile.

Upvotes: 0

Views: 3145

Answers (1)

vivekyad4v
vivekyad4v

Reputation: 14903

There won't be any advantages. You should choose the base image as the one which you are comfortable working on or the one which is more efficient. This entirely depends on your needs.

Docker images by nature have nothing to do with the docker host.

Docker integrates with your system kernel and ensures that things are portable, so you can use FROM ubuntu on any OS which supports Docker.

You might want to have a quick look on the Docker engine architecture - "https://docs.docker.com/engine/docker-overview/"

Docker supports Linux, Windows & MAC OS.

Read the compatibility matrix -
https://www.docker.com/community-edition

https://docs.docker.com/engine/faq/#does-docker-run-on-linux-macos-and-windows

PS - The answer to this question is quite broad & ends up talking about the fundamental concepts of Docker. I hope i was able to clarify your doubt to some extent.

Upvotes: 1

Related Questions