What is the FROM instruction good for in Docker?
Experience Level: Senior
Tags: Docker
Answer
The FROM instruction initializes a new build stage and sets the Base Image for subsequent instructions. As such, a valid Dockerfile must start with a FROM instruction. The image can be any valid image – it is especially easy to start by pulling an image from the Public Repositories.
Example:
FROM busybox
Related Docker job interview questions
Does FROM instruction support variables within a Dockerfile?
Docker SeniorHow many times can the FROM instruction appear within a Dockerfile?
Docker SeniorAre Docker instructions case sensitive?
Docker SeniorHow can you add comments to your Dockerfile?
Docker SeniorHow do you write a list of all running Docker containers to a file file.txt?
DockerDocker CLI Junior