Skip to content

Config data types are tied to the build platform #324

@aaronlehmann

Description

@aaronlehmann

It's currently not possible to use the specs library to manipulate a Linux container configuration on a different platform, because some of the data types are defined in config_linux.go and runtime_config_linux.go. As a result, the package doesn't even compile on non-Linux platforms:

# github.com/opencontainers/specs
./config.go:26: undefined: User

Varying the data types based on the build target platform doesn't seem like the right approach. It should be possible for a non-architecture-specific tool or client to parse or generate configurations for containers that will eventually run on Linux.

The current approach is also problematic for projects which vendor github.com/opencontainers/specs but still need to support other platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions