Top Related Projects
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
An open and reliable container runtime
:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:
CLI for building apps using Cloud Native Buildpacks
Work with remote images registries - retrieving information, images, signing content
Quick Overview
The opencontainers/image-spec repository contains the Open Container Initiative (OCI) Image Format Specification. This project defines an industry standard for container images, ensuring interoperability between different container runtimes and image building tools. It provides a set of specifications for the format of container images, including their configuration, filesystem layers, and metadata.
Pros
- Promotes standardization and interoperability in the container ecosystem
- Backed by major industry players, ensuring wide adoption and support
- Provides a clear and well-documented specification for container image formats
- Enables portability of container images across different platforms and runtimes
Cons
- May require adaptation for existing container technologies to fully comply with the specification
- Can be complex for newcomers to the container ecosystem to understand and implement
- Ongoing development and updates may require periodic adjustments for implementers
- Limited to image format specification, not covering other aspects of container runtime behavior
Code Examples
This repository does not contain a code library, but rather specifications and documentation. Therefore, code examples are not applicable in this case.
Getting Started
As this is not a code library, there are no specific getting started instructions. However, users interested in understanding and implementing the OCI Image Specification can follow these steps:
- Visit the repository: https://github.com/opencontainers/image-spec
- Read the README.md file for an overview of the project
- Explore the
spec.md
file in the repository for detailed specifications - Review the
manifest.md
,config.md
, andlayer.md
files for specific aspects of the image format - Join the OCI community and mailing lists for discussions and updates on the specification
Competitor Comparisons
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Pros of moby
- More comprehensive project covering entire container ecosystem
- Larger community and more active development
- Includes runtime implementation and additional tools
Cons of moby
- More complex and harder to understand for newcomers
- Less focused on standardization compared to image-spec
- Potentially slower to adopt new features due to larger codebase
Code comparison
image-spec:
type Image struct {
Config Descriptor `json:"config"`
Layers []Descriptor `json:"layers"`
}
moby:
type Image struct {
V1Image
Parent string `json:"parent,omitempty"`
Container string `json:"container,omitempty"`
Config *Config `json:"config,omitempty"`
Architecture string `json:"architecture,omitempty"`
OS string `json:"os,omitempty"`
}
Summary
image-spec focuses on standardizing container image format, while moby is a broader project encompassing various container-related components. image-spec provides a clear, concise specification, making it easier for implementers to understand and adopt. moby, on the other hand, offers a complete container solution with runtime implementation and additional tools, but at the cost of increased complexity. Both projects contribute significantly to the container ecosystem, with image-spec emphasizing standardization and moby providing a comprehensive platform for container operations.
An open and reliable container runtime
Pros of containerd
- Provides a complete container runtime implementation
- Offers broader functionality beyond image specifications
- Actively maintained with frequent updates and community support
Cons of containerd
- More complex and resource-intensive
- Steeper learning curve for newcomers
- May include features unnecessary for simple container management
Code Comparison
image-spec:
type Image struct {
Config Descriptor `json:"config"`
Layers []Descriptor `json:"layers"`
}
containerd:
type Container struct {
ID string
Image string
Runtime string
Spec *specs.Spec
Task Task
}
Summary
image-spec focuses on defining standards for container images, while containerd provides a full container runtime implementation. image-spec is more lightweight and specific to image formats, making it easier to understand and implement for image-related tasks. containerd offers a comprehensive solution for container management but may be overkill for projects only needing image handling.
image-spec is ideal for developers working on tools that interact with container images, while containerd is better suited for building complete container management systems or integrating container functionality into larger projects.
Both projects are valuable in the container ecosystem, with image-spec providing the foundation for standardized image formats and containerd offering a robust runtime implementation that adheres to these standards.
:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:
Pros of docker-ce
- Comprehensive container platform with a full suite of tools
- Widely adopted and supported by a large community
- Includes Docker Engine, CLI, and additional features like Swarm mode
Cons of docker-ce
- Larger codebase and more complex architecture
- Less focused on standardization compared to image-spec
- May include proprietary components not compatible with other container runtimes
Code Comparison
image-spec:
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 7023,
"digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7"
}
}
docker-ce:
func (daemon *Daemon) containerStart(container *container.Container, checkpoint string, checkpointDir string, resetRestartManager bool) (err error) {
container.Lock()
defer container.Unlock()
if resetRestartManager && container.RestartManager != nil {
container.RestartManager.Cancel()
}
}
Summary
image-spec focuses on defining a standard format for container images, promoting interoperability between different container runtimes. docker-ce, on the other hand, provides a full-featured container platform with additional tools and capabilities. While docker-ce offers a more comprehensive solution, image-spec aims for simplicity and standardization across the container ecosystem.
CLI for building apps using Cloud Native Buildpacks
Pros of pack
- Simplifies the container build process with a higher-level abstraction
- Supports multiple programming languages and frameworks out-of-the-box
- Provides automatic dependency management and runtime detection
Cons of pack
- Less flexibility in fine-tuning container images compared to direct OCI spec usage
- May introduce additional complexity for advanced use cases
- Limited control over the underlying image structure
Code Comparison
pack:
pack build myapp --builder cnbs/sample-builder:bionic
image-spec:
{
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 7023,
"digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7"
}
}
pack focuses on simplifying the build process with a single command, while image-spec provides a low-level specification for container images. pack abstracts away many details, making it easier for developers to create container images without deep knowledge of the underlying structure. However, this abstraction can limit flexibility for advanced users who need fine-grained control over image composition.
image-spec, on the other hand, offers a standardized format for container images, allowing for greater interoperability and customization. It provides a foundation for tools like pack to build upon, ensuring compatibility across different container runtimes and platforms.
Work with remote images registries - retrieving information, images, signing content
Pros of skopeo
- Practical tool for container image operations (copying, inspecting, deleting)
- Supports multiple image formats and registries
- Actively maintained with regular updates and bug fixes
Cons of skopeo
- Focused on image operations rather than standardization
- May have compatibility issues with non-standard image formats
- Requires installation and setup, unlike a specification document
Code comparison
image-spec (JSON schema example):
{
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 7023,
"digest": "sha256:b5b2b2c507a0944348e0303114d8d93aaaa081732b86451d9bce1f432a537bc7"
}
}
skopeo (command-line usage example):
skopeo copy docker://registry.example.com/image:tag \
docker://registry.example.com/image:newtag
Summary
image-spec is a standardization effort for container image formats, while skopeo is a practical tool for working with container images. image-spec provides a specification for image formats, ensuring consistency across different container technologies. skopeo, on the other hand, offers hands-on functionality for managing and manipulating container images across various registries and formats. While image-spec focuses on standardization, skopeo provides practical utility for container image operations.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
OCI Image Format Specification
The OCI Image Format project creates and maintains the software shipping container image format spec (OCI Image Format).
The specification can be found here.
This repository also provides Go types, intra-blob validation tooling, and JSON Schema. The Go types and validation should be compatible with the current Go release; earlier Go releases are not supported.
Additional documentation about how this group operates:
Running an OCI Image
The OCI Image Format partner project is the OCI Runtime Spec project. The Runtime Specification outlines how to run a "filesystem bundle" that is unpacked on disk. At a high-level an OCI implementation would download an OCI Image then unpack that image into an OCI Runtime filesystem bundle. At this point the OCI Runtime Bundle would be run by an OCI Runtime.
This entire workflow supports the UX that users have come to expect from container engines like Docker and rkt: primarily, the ability to run an image with no additional arguments:
- docker run example.com/org/app:v1.0.0
- rkt run example.com/org/app,version=v1.0.0
To support this UX the OCI Image Format contains sufficient information to launch the application on the target platform (e.g. command, arguments, environment variables, etc).
Distributing an OCI Image
The OCI Distribution Spec Project defines an API protocol to facilitate and standardize the distribution of content. This API includes support for pushing and pulling OCI images to an OCI conformant registry.
FAQ
Q: What happens to AppC or Docker Image Formats?
A: Existing formats can continue to be a proving ground for technologies, as needed. The OCI Image Format project strives to provide a dependable open specification that can be shared between different tools and be evolved for years or decades of compatibility; as the deb and rpm format have.
Find more FAQ on the OCI site.
Roadmap
The GitHub milestones lay out the path to the future improvements.
Contributing
Development happens on GitHub for the spec. Issues are used for bugs and actionable items and longer discussions can happen on the mailing list.
The specification and code is licensed under the Apache 2.0 license found in the LICENSE
file of this repository.
Discuss your design
The project welcomes submissions, but please let everyone know what you are working on.
Before undertaking a nontrivial change to this specification, send mail to the mailing list to discuss what you plan to do. This gives everyone a chance to validate the design, helps prevent duplication of effort, and ensures that the idea fits. It also guarantees that the design is sound before code is written; a GitHub pull-request is not the place for high-level discussions.
Typos and grammatical errors can go straight to a pull-request. When in doubt, start on the mailing-list.
Meetings
Please see the OCI org repository README for the most up-to-date information on OCI contributor and maintainer meeting schedules. You can also find links to meeting agendas and minutes for all prior meetings.
Mailing List
You can subscribe and join the mailing list on Google Groups.
Markdown style
To keep consistency throughout the Markdown files in the Open Container spec all files should be formatted one sentence per line. This fixes two things: it makes diffing easier with git and it resolves fights about line wrapping length. For example, this paragraph will span three lines in the Markdown source.
Git commit
Sign your work
The sign-off is a simple line at the end of the explanation for the patch, which certifies that you wrote it or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify the below (from developercertificate.org):
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
then you just add a line to every git commit message:
Signed-off-by: Joe Smith <joe@gmail.com>
using your real name (sorry, no pseudonyms or anonymous contributions.)
You can add the sign off when creating the git commit via git commit -s
.
Commit Style
Simple house-keeping for clean git history.
Read more on How to Write a Git Commit Message or the Discussion section of git-commit(1)
.
- Separate the subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
- If there was important/useful/essential conversation or information, copy or include a reference
- When possible, one keyword to scope the change in the subject (i.e. "README: ...", "runtime: ...")
Top Related Projects
The Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
An open and reliable container runtime
:warning: This repository is deprecated and will be archived (Docker CE itself is NOT deprecated) see the https://github.com/docker/docker-ce/blob/master/README.md :warning:
CLI for building apps using Cloud Native Buildpacks
Work with remote images registries - retrieving information, images, signing content
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot