Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify UTF-8 for all our JSON #146

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Configuration file

The container's top-level directory MUST contain a configuration file called `config.json`.
The bundle's top-level directory MUST contain a configuration file called `config.json` with [UTF-8][] [JSON][].
For now the canonical schema is defined in [spec.go](spec.go) and [spec_linux.go](spec_linux.go), but this will be moved to a formal JSON schema over time.

The configuration file contains metadata necessary to implement standard operations against the container.
Expand Down Expand Up @@ -124,3 +124,6 @@ For Linux-based systems the user structure has the following fields:
```

Interpretation of the platform section of the JSON file is used to find which platform-specific sections may be available in the document. For example, if `os` is set to `linux`, then a JSON object conforming to the [Linux-specific schema](config-linux.md) SHOULD be found at the key `linux` in the `config.json`.

[UTF-8]: http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf
[JSON]: http://json.org/
8 changes: 8 additions & 0 deletions runtime-config.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Host-specific container configuration

The bundle's top-level directory MUST contain a configuration file called `runtime.json` with [UTF-8][] [JSON][].
For now the canonical schema is defined in [`runtime_config.go`](runtime_config.go) and [runtime_config_linux.go](runtime_config.go), but this will be moved to a formal JSON schema over time.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have the OS specific reference be more generic than pointing out linux individually.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and "moved to a formal JSON schema over time" where and why this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Fri, Sep 04, 2015 at 11:44:48AM -0700, Vincent Batts wrote:

and "moved to a formal JSON schema over time" where and why this comment?

Both are just echoing the current host-independent phrasing 1. I
tried to make that clear in the commit message [2] and original PR
post with the:

“To get a place to say this for the runtime.json docs, I used
config.md as a template for the top-level header and blurb.”

text, but I'm happy to use different commit-message phrasing if that
would help make the source more obvious.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that phasing. This feels like something to have roadmapped and discussed rather than alluding to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Tue, Sep 08, 2015 at 03:59:13PM -0700, Vincent Batts wrote:

This feels like something to have roadmapped and discussed rather
than alluding to.

Sounds reasonable to me. Shall I open the mailing-list thread, or
would you like to?

And is there an alternative phrasing you'd like to see here in the
meantime, so we can land the UTF-8 notes in this PR without waiting on
the desired-schema-language discussion? Copying the existing phrasing
from config.md seemed like the least opinionated approach, but maybe
just dropping the “For now the canonical schema…” line with it's
Go-file links would be better?


## Mount Configuration

Additional filesystems can be declared as "mounts", specified in the *mounts* object.
Expand Down Expand Up @@ -51,3 +56,6 @@ Only [mounts from the portable config](config.md#mount-points) will be mounted.
```

See links for details about [mountvol](http://ss64.com/nt/mountvol.html) and [SetVolumeMountPoint](https://msdn.microsoft.com/en-us/library/windows/desktop/aa365561(v=vs.85).aspx) in Windows.

[UTF-8]: http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf
[JSON]: http://json.org/
5 changes: 4 additions & 1 deletion runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## State

The runtime state for a container is persisted on disk so that external tools can consume and act on this information.
The runtime state is stored in a JSON encoded file.
The runtime state is stored in a [UTF-8][] [JSON][] file.
It is recommended that this file is stored in a temporary filesystem so that it can be removed on a system reboot.
On Linux based systems the state information should be stored in `/run/oci/containers`.
The directory structure for a container is `/run/oci/containers/<containerID>/state.json`.
Expand Down Expand Up @@ -86,3 +86,6 @@ If a hook returns a non-zero exit code, then an error is logged and the remainin
```

`path` is required for a hook. `args` and `env` are optional.

[UTF-8]: http://www.unicode.org/versions/Unicode8.0.0/ch03.pdf
[JSON]: http://json.org/