Hi,
I am taking over a Dockerfile to setup an image of a monitoring host running Ubuntu.
The file contains a line:
ADD overlay /
I cant find an explanation of it on the Docker file reference doc as ADD has no overlay option in it
Find all the available commands you can use in a Dockerfile and learn how to use them, including COPY, ARG, ENTRYPOINT, and more.
Can someone please explain what it means and why i cant find it in the ref doc?
Many thanks
rimelek
(Ákos Takács)
March 17, 2025, 9:01am
2
“overlay” is not an option, but a folder containing the root filesystem of the image as a first layer. Probably a Linux distribution or files of a distroless image. You linked the documentation which starts with this:
ADD [OPTIONS] <src> ... <dest>
ADD [OPTIONS] ["<src>", ... "<dest>"]
[ ]
means optional while < >
means mandatory. So overlay is not an option, but <src>
Thanks
This is a normal Ubuntu the Dockerfile also has these 2 labels
LABEL org.opencontainers.image.ref.name=ubuntu|
LABEL org.opencontainers.image.version=24.04|
Do you have an idea what would be the logic behind this directive?
rimelek
(Ákos Takács)
March 18, 2025, 6:51pm
4
Those are standard labels which you can find by searching for the label name like org.opencontainers.image.ref.name
# Annotations
Several components of the specification, like [Image Manifests](manifest.md) and [Descriptors](descriptor.md), feature an optional annotations property, whose format is common and defined in this section.
This property contains arbitrary metadata.
## Rules
- Annotations MUST be a key-value map where both the key and value MUST be strings.
- While the value MUST be present, it MAY be an empty string.
- Keys MUST be unique within this map, and best practice is to namespace the keys.
- Keys SHOULD be named using a reverse domain notation - e.g. `com.example.myKey`.
- The prefix `org.opencontainers` is reserved for keys defined in Open Container Initiative (OCI) specifications and MUST NOT be used by other specifications and extensions.
- Keys using the `org.opencontainers.image` namespace are reserved for use in the OCI Image Specification and MUST NOT be used by other specifications and extensions, including other OCI specifications.
- If there are no annotations then this property MUST either be absent or be an empty map.
- Consumers MUST NOT generate an error if they encounter an unknown annotation key.
## Pre-Defined Annotation Keys
This specification defines the following annotation keys, intended for but not limited to [image index](image-index.md), image [manifest](manifest.md), and [descriptor](descriptor.md) authors.
This file has been truncated. show original
Also the link from the documentation
Docker object labels | Docker Docs .
You probably need to learn the Docker and container basics too.
Recommended links to learn the basics and concepts:
But this was not related to the original question, so please, if you have other questions, open a new topic for new questions.
system
(system)
Closed
April 17, 2025, 6:51pm
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.