Home > database >  Base image with specific operating system base image
Base image with specific operating system base image

Time:12-28

when running a base image in Docker file of ubuntu or windows or any other operating system, for example:

 "ubuntu:latest"

do I have to run/build the docker application on a machine with the same operating system corresponding to the operating system in the base image?

CodePudding user response:

No. The only restrictions like that is that Linux images have to run on a Linux host and Windows images have to run on a Windows host.

You can run Alpine, Debian and Ubuntu images on the same Linux host. The thing to have in mind is that the image doesn't contain a Linux kernel, so if you run an Alpine image on a Debian host, your container is running on Debian.

When an image is called Alpine or Debian, that refers to the binaries and libraries that are included. The kernel is shared among containers and is the host's kernel.

  • Related