I am new to Docker technology and I did my research according to my question. There are few similar questions like these:
What is the relationship between the docker host OS and the container base image OS?
Host-based-containers vs image-based-containers
I thought I understood Docker until I saw the BusyBox docker image
Why do you need a base image with Docker?
but I still don't understand should I use base image OS or base image JDK if I have a Linux host OS with JDK installed.
I was checking some Dockerfiles of official images on DockerHub and I saw lines like FROM ubuntu
, FROM alpine
, FROM openjdk:8-jdk
and I don't understand why is it necessary?
I have read something about isolation or encapsulation for filesystem in container. Maybe they are used to specify container specific environment variables or arguments for Java or OS.
I will be grateful for any explanation, thanks.