I am looking at a docker file which does not specify a specific base image operating system (like FROM ubuntu: 14:04). Is there any specification on the default operating system used when building an image (and not specifying a base os-image)?
You always should have a FROM instruction for a Dockerfile as per documentation as mentioned by Munir. However, you can choose variety of base images, which does not have to be an OS for your Dockerfile. For example, if you are creating a docker image for your java application, you can use java image as your base images.
FROM library/java
However, at the end, if you traverse thorough those image's Dockerfile, you will end up in one or the other OS. Java is based on Debian.
according to the docker reference https://docs.docker.com/engine/reference/builder/
Docker runs the instructions in a Dockerfile in order. The first instruction must be
FROM
in order to specify the Base Image from which you are building.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With