Skip to content

Some defination in serialization.md may conflict with README.md? #218

@coolljt0725

Description

@coolljt0725

According to the description [https://github.com/opencontainers/image-spec/blob/master/README.md#running-an-oci-image] in README.md

This entire workflow should support 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).

So the goal is to run an image with no additional arguments and the OCI Image Format will contains the sufficient information. But during reading the https://github.com/opencontainers/image-spec/blob/master/serialization.md#container-runconfig-field-descriptions , I found the the Config MAY be null

config struct
The execution parameters which should be used as a base when running a container using the image. This field can be null, in which case any execution parameters should be specified at creation of the container.

and also the Cmd and Entrypoint MAY be null

Entrypoint array of strings
A list of arguments to use as the command to execute when the container starts. This value acts as a default and is replaced by an entrypoint specified when creating a container. This field MAY be "null".
Cmd array of strings
Default arguments to the entrypoint of the container. These values act as defaults and are replaced with any specified when creating a container. If an Entrypoint value is not specified, then the first entry of the Cmd array should be interpreted as the executable to run. This field MAY be "null".

The config or both Cmd and Entrypoit is null is not sufficient to run a container with no additional arguments.

There does some images which Cmd and Entrypoint are null, we can't launch a container if we don't specified it on creation. So I think we should change the README.md or change the defination in serialization.md or I just misunderstand it? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions