dockerclient icon indicating copy to clipboard operation
dockerclient copied to clipboard

Is there a particular reason when fields don't have omitempty?

Open aanm opened this issue 10 years ago • 1 comments

Why doesn't all ContainerConfig fields have a json:"omitempty"?

aanm avatar Sep 02 '15 19:09 aanm

I'd like to get an answer to this question as I am experiencing an issue caused by it. In Docker 1.9.1 an shmsize of 0 is not replaced by the default value. It therefore errors with "SHM size must be greater then 0" (Yes there is a typo of then/than)

I am using Drone CI which uses this library and does not expose the ContainerConfig. Docker >= 1.10 replaces an shmsize of 0 with the default but we are pinned to 1.9.1 for now because we are using Openshift Origin.

If the shmsize and had the json:",omitempty" tag then our issue would be resolved.

hrobertson avatar Apr 13 '16 16:04 hrobertson