From e0afe63b306bfc7eefc196aa8f32b664f54fac8b Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Thu, 16 Jun 2016 10:17:17 -0700 Subject: [PATCH 1/2] serialization: add test, make volumes null This is a spec change based on testing live Docker Hub configs. Volume may be null as found in the hub.docker.com/library/docker image. Signed-off-by: Brandon Philips --- schema/defs-config.json | 5 ++- schema/fs.go | 34 +++++++++---------- .../manifest_backwards_compatibility_test.go | 33 ++++++++++++++++++ serialization.md | 2 +- 4 files changed, 55 insertions(+), 19 deletions(-) diff --git a/schema/defs-config.json b/schema/defs-config.json index dbf3b7237..c23bfb6e7 100644 --- a/schema/defs-config.json +++ b/schema/defs-config.json @@ -38,7 +38,10 @@ } }, "Volumes": { - "$ref": "defs.json#/definitions/mapStringObject" + "oneOf": [ + {"$ref": "defs.json#/definitions/mapStringObject"}, + {"type": "null"} + ] }, "WorkingDir": { "type": "string" diff --git a/schema/fs.go b/schema/fs.go index fb447c773..577d6cdd9 100644 --- a/schema/fs.go +++ b/schema/fs.go @@ -204,14 +204,14 @@ var _escData = map[string]*_escFile{ "/config-schema.json": { local: "config-schema.json", - size: 707, - modtime: 1466261692, + size: 710, + modtime: 1466466955, compressed: ` -H4sIAAAJbogA/5SRPW7DMAyF5/oUhpOxjjp0ytoDdOgJVJmKGcCiQDJDUPju1U/c2kvhLobx+L73JOqr -adtuAHGMUZFCd2679wjhjYJaDMBt+vN4aT8iOPTobHE9Z+woboTJZmRUjWdjrkKhr+qJ+GIGtl77l1dT -tUPlcFgQSQylNre0ScGq2+BkL2Bc6a+k3iNklj6v4LRqkVMCK4KkSb5O0hyDVRh+hBUqyhhqXNE98WQ1 -T4aE9IoTdGU2V0tnbzoS/xG1dbMbUdPhbgx7GZK9zscuVu4jgy+HBy99HZ/yKxxMUjBgfi1ZdrjJYiL1 -8v+sB7fJGlGU+F7CnlZ3sMz2/rvrtJhp3bi7c8l/cHOzfOdmbr4DAAD//1EkCUvDAgAA +H4sIAAAJbogA/5SRPW7DMAyFd5/CcDLWUYdOWXuADj2BKlMxA1gUSGYICt+9+olbGygKdzGMx/e9J1Gf +Tdt2A4hjjIoUunPbvUUIrxTUYgBu05/HS/sewaFHZ4vrKWNHcSNMNiOjajwbcxUKfVVPxBczsPXaP7+Y +qh0qh8OCSGIotbmlTQpW3QYnewHjSn8l9R4hs/RxBadVi5wSWBEkTfJ1kuYYrMLwLaxQUcZQ44ruiSer +eTIkpFecoCuzuVo6e9OR+I+orZvdiJoOd2PYy5DsdT52sXIfGXw5PHjp6/iUX+FgkoIB82vJssNNFhOp +l/9nPbhN1oiixPffrmGZ7f1n3Wk307p0d+1S8eDmZvnOzdx8BQAA//964XeexgIAAA== `, }, @@ -230,23 +230,23 @@ AmOHXKZBD4uOEV+XM+U8dnlDg+1xq8uuyj8F0tRsfnpH6lzhNtPHf5OoBSjA/iSYr5hmvgkqz9QjX/Z5 "/defs-config.json": { local: "defs-config.json", - size: 1755, - modtime: 1466261692, + size: 1828, + modtime: 1466466976, compressed: ` -H4sIAAAJbogA/7xUzc7TMBA8N09hBY6BXhAHri1HVKQIOFZusm63xF5rvQEi1HfHSauS/qRKKV8PVeOx -Z2bXY/t3olRaQigYvSC59INK52DQYTsKymsWLOpKsxJSCw9uRk40OmAVvwyuVe6hQIOF7vjZXvCoEAVb -jwgW3fLjOCLSeGgNabWFQjpqh3smD9EXQm91xL8E4BOkpxGE0a3T49Qu+8v7BJa4OWe+ZjAtMxYb3m4D -uVfTXt1TdPL+3S29/Kf2/09z5ut8o/ms5YckP/7yFKD8TCz3qlrt825DF/toruu7H0NpaGbdpFl/CgXs -eRk38otWA6bCjafY9vO9Z7Z8vulXqmp797EYFeA34u9xyRzH36qk/3/QSplITHjkZpdozBLLiy5ffnsr -3QAP+o7rf4NBTh+YuzegYNACg8frUEeWTCYRNcRWS5d+JL0RtHA9YF3Lhv7pyTzUs1xdPJuj2GQtDN/Q -W1SwXppll8oQfUVUgXaDqSTtb5f8CQAA//8Cok052wYAAA== +H4sIAAAJbogA/7xUzY7TMBC+5ymswDGwF8SBa5cjKlIEHBCq3GS8nSX2WOMJEK3y7jhpKUnaVC1le6ia +jPP9eD57nhKl0hJCwegFyaXvVHoPBh12b0F5zYJFXWlWQmrpwS3IiUYHrOKTwQeVeyjQYKF7fLYl3DNE +wk4jFov+8/17rEjjoROk9SMU0kP7umfyEHUhDL6O9U8BeFQZcARhdA/pfqnN/uI+gCVupsiXDKZDRrPh +9WMg9+Ju4PsOnbx9c4ov/6n9/+Nc+DrfaJ5s+SrK9788BSg/EsulrFb7vG/ochvNcX73Yy4NzaybNBsu +oYCd2jiRX5SaERVuPMVt3157Ycvbi36mqraHx4IcLLsEv47Yny4Nts0m+D/2XF1VaTtY/HbU3Rfi75Ht +Hs+/mMnwf8eVMpGYcM1wKNGYFZYHjXr+hCrdAM/qnrf/DQYZz6iLG1AwaIHZE7rzMWqAIbZa+uMSoa8E +LRy/6rqWDf3T7N25Wq0P5u9ZaLIW5q/6KShYL82qz2YOviaqQLvZbJLu1ya/AwAA//+5mfnPJAcAAA== `, }, "/defs-image.json": { local: "defs-image.json", size: 2528, - modtime: 1466180793, + modtime: 1466438460, compressed: ` H4sIAAAJbogA/7RWy27bMBC8+ysIJUAOfqjXGkGAoEGBnlIgPTVQgY20kphKpLqkgzqB/r2k3k+nrt0b ueQOZ4Zjym8LxpwAlU8801wKZ8ucOwy54HamWAakub9LgJiW7D5D8UkKDVwgsS8pRMgeMvR5yH0o2lcl diff --git a/schema/manifest_backwards_compatibility_test.go b/schema/manifest_backwards_compatibility_test.go index 6153d2e62..876d1b071 100644 --- a/schema/manifest_backwards_compatibility_test.go +++ b/schema/manifest_backwards_compatibility_test.go @@ -187,3 +187,36 @@ func TestBackwardsCompatibilityManifest(t *testing.T) { } } } + +func TestBackwardsCompatibilityConfig(t *testing.T) { + for i, tt := range []struct { + manifest string + digest string + fail bool + }{ + // manifest pulled from docker hub blob store + // + // curl -L -H "Authorization: Bearer ..." -H \ + // -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + // https://registry-1.docker.io/v2/library/docker/blobs/sha256:5359a4f250650c20227055957e353e8f8a74152f35fe36f00b6b1f9fc19c8861 + { + digest: "sha256:5359a4f250650c20227055957e353e8f8a74152f35fe36f00b6b1f9fc19c8861", + manifest: `{"architecture":"amd64","config":{"Hostname":"e5e5b3910a57","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","DOCKER_BUCKET=get.docker.com","DOCKER_VERSION=1.10.3","DOCKER_SHA256=d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d"],"Cmd":["sh"],"ArgsEscaped":true,"Image":"sha256:bda352ba7ab5823b7dc74b380c5ad1699edee278a6d2ebbe451129b108778742","Volumes":null,"WorkingDir":"","Entrypoint":["docker-entrypoint.sh"],"OnBuild":[],"Labels":{}},"container":"881be788b4387039b52fa195da9fe26f264385aa497ce650cfdcf3806c2d2021","container_config":{"Hostname":"e5e5b3910a57","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","DOCKER_BUCKET=get.docker.com","DOCKER_VERSION=1.10.3","DOCKER_SHA256=d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d"],"Cmd":["/bin/sh","-c","#(nop) CMD [\"sh\"]"],"ArgsEscaped":true,"Image":"sha256:bda352ba7ab5823b7dc74b380c5ad1699edee278a6d2ebbe451129b108778742","Volumes":null,"WorkingDir":"","Entrypoint":["docker-entrypoint.sh"],"OnBuild":[],"Labels":{}},"created":"2016-06-08T00:52:29.30472774Z","docker_version":"1.10.3","history":[{"created":"2016-06-08T00:48:01.932532048Z","created_by":"/bin/sh -c #(nop) ADD file:bca92e550bd2ce926584aef2032464b6ebf543ce69133b6602c781866165d703 in /"},{"created":"2016-06-08T00:52:10.503417531Z","created_by":"/bin/sh -c apk add --no-cache \t\tca-certificates \t\tcurl \t\topenssl"},{"created":"2016-06-08T00:52:10.700704697Z","created_by":"/bin/sh -c #(nop) ENV DOCKER_BUCKET=get.docker.com","empty_layer":true},{"created":"2016-06-08T00:52:25.746175479Z","created_by":"/bin/sh -c #(nop) ENV DOCKER_VERSION=1.10.3","empty_layer":true},{"created":"2016-06-08T00:52:25.954613633Z","created_by":"/bin/sh -c #(nop) ENV DOCKER_SHA256=d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d","empty_layer":true},{"created":"2016-06-08T00:52:28.173693898Z","created_by":"/bin/sh -c curl -fSL \"https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION\" -o /usr/local/bin/docker \t\u0026\u0026 echo \"${DOCKER_SHA256} /usr/local/bin/docker\" | sha256sum -c - \t\u0026\u0026 chmod +x /usr/local/bin/docker"},{"created":"2016-06-08T00:52:28.924486515Z","created_by":"/bin/sh -c #(nop) COPY file:50006c902e7677711aeffe4ab7b7042d649618b96dec760f322a8566dd83ab25 in /usr/local/bin/"},{"created":"2016-06-08T00:52:29.121963047Z","created_by":"/bin/sh -c #(nop) ENTRYPOINT \u0026{[\"docker-entrypoint.sh\"]}","empty_layer":true},{"created":"2016-06-08T00:52:29.30472774Z","created_by":"/bin/sh -c #(nop) CMD [\"sh\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:77f08abee8bf9334407f52d104e1891283018450b3c196118ddfe31505126b87","sha256:707d16737060172b977d5f7eaaddfcfaae1008472193d7e8e5a01111a5f8dd5c","sha256:44da042e7b2458ee0b3877f2321cdf4fd45a49b9b51e00492c2ba68055573eff","sha256:1bc2be83dce13b9bac9476c9c1d2ca6e0db3e07b443f7298fc5a1af75b2cb4ef"]}}`, + fail: false, + }, + } { + sum := sha256.Sum256([]byte(tt.manifest)) + got := fmt.Sprintf("sha256:%s", hex.EncodeToString(sum[:])) + if tt.digest != got { + t.Errorf("test %d: expected digest %s but got %s", i, tt.digest, got) + } + + manifest := convertFormats(tt.manifest) + r := strings.NewReader(manifest) + err := schema.MediaTypeImageSerializationConfig.Validate(r) + + if got := err != nil; tt.fail != got { + t.Errorf("test %d: expected validation failure %t but got %t, err %v", i, tt.fail, got, err) + } + } +} diff --git a/serialization.md b/serialization.md index 4fa18586d..6e6918805 100644 --- a/serialization.md +++ b/serialization.md @@ -297,7 +297,7 @@ Note: whitespace has been added to this example for clarity. Whitespace is OPTIO Volumes struct
- A set of directories which should be created as data volumes in a container running this image. + A set of directories which should be created as data volumes in a container running this image. This field MAY be "null".

If a file or folder exists within the image with the same path as a data volume, that file or folder is replaced with the data volume and is never merged.

From d365b7994711ab6a4e096d36b8ad3975419bd033 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Thu, 16 Jun 2016 21:39:37 +0200 Subject: [PATCH 2/2] serialization: Entrypoint and Cmd nullable Signed-off-by: Antonio Murdaca --- schema/defs-config.json | 38 ++++++++++++++----- schema/fs.go | 19 +++++----- .../manifest_backwards_compatibility_test.go | 7 ++++ serialization.md | 4 +- 4 files changed, 47 insertions(+), 21 deletions(-) diff --git a/schema/defs-config.json b/schema/defs-config.json index c23bfb6e7..47ad2c6c0 100644 --- a/schema/defs-config.json +++ b/schema/defs-config.json @@ -26,21 +26,39 @@ } }, "Entrypoint": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "Cmd": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "Volumes": { "oneOf": [ - {"$ref": "defs.json#/definitions/mapStringObject"}, - {"type": "null"} + { + "$ref": "defs.json#/definitions/mapStringObject" + }, + { + "type": "null" + } ] }, "WorkingDir": { diff --git a/schema/fs.go b/schema/fs.go index 577d6cdd9..5f4db5d89 100644 --- a/schema/fs.go +++ b/schema/fs.go @@ -230,16 +230,17 @@ AmOHXKZBD4uOEV+XM+U8dnlDg+1xq8uuyj8F0tRsfnpH6lzhNtPHf5OoBSjA/iSYr5hmvgkqz9QjX/Z5 "/defs-config.json": { local: "defs-config.json", - size: 1828, - modtime: 1466466976, + size: 2154, + modtime: 1466467007, compressed: ` -H4sIAAAJbogA/7xUzY7TMBC+5ymswDGwF8SBa5cjKlIEHBCq3GS8nSX2WOMJEK3y7jhpKUnaVC1le6ia -jPP9eD57nhKl0hJCwegFyaXvVHoPBh12b0F5zYJFXWlWQmrpwS3IiUYHrOKTwQeVeyjQYKF7fLYl3DNE -wk4jFov+8/17rEjjoROk9SMU0kP7umfyEHUhDL6O9U8BeFQZcARhdA/pfqnN/uI+gCVupsiXDKZDRrPh -9WMg9+Ju4PsOnbx9c4ov/6n9/+Nc+DrfaJ5s+SrK9788BSg/EsulrFb7vG/ochvNcX73Yy4NzaybNBsu -oYCd2jiRX5SaERVuPMVt3157Ycvbi36mqraHx4IcLLsEv47Yny4Nts0m+D/2XF1VaTtY/HbU3Rfi75Ht -Hs+/mMnwf8eVMpGYcM1wKNGYFZYHjXr+hCrdAM/qnrf/DQYZz6iLG1AwaIHZE7rzMWqAIbZa+uMSoa8E -LRy/6rqWDf3T7N25Wq0P5u9ZaLIW5q/6KShYL82qz2YOviaqQLvZbJLu1ya/AwAA//+5mfnPJAcAAA== +H4sIAAAJbogA/+RVzY7TMBC+5ymswLGwF8SB6y5HVKQIOCBUucl4O0vsscYTIEL77jjZquSnCWlLT3uo +mkz8/cyMPf6dKJUWEHJGL0gufafSOzDosHkLymsWzKtSsxJSaw/ulpxodMAqPhm8V5mHHA3musWvnggP +DJGw0YjBvF1+eI8RqT00grR9gFxaaBv3TB6iLoTO6hj/FIB7kQ5HEEZ3nx4+Pa7+4j6AJa6HyJcMpkFG +s+H1QyD34qbj+wadvH0zx5f91P7/cd76KttpHqR8EeX7X54CFB+J5VRWq33WFnT91Jrj/O7HVDc0s67T +VfcTCtihjZn+RakJUeHaU0x7qE0O1k1OX3sCfblZizM2/2G1b3dgedaFq8qyz9Tl+XZ8q9ji2eb+mcrK +jg/JwvzP3fXXzuoL8fcoe4fLx1vS/d9zpUwkJlwyYgs0ZoPFqMDXP9ilroEndZflv8Mg/Ul/cgFyBi0w +OmADH70CGGKrpd1XEfpK0MLxgakr2dFZN9je1WY7usUWoclaGA/MJVCwXupN25sp+JaoBO0me5M0v8fk +TwAAAP//dkZ6ZWoIAAA= `, }, diff --git a/schema/manifest_backwards_compatibility_test.go b/schema/manifest_backwards_compatibility_test.go index 876d1b071..531cc77a6 100644 --- a/schema/manifest_backwards_compatibility_test.go +++ b/schema/manifest_backwards_compatibility_test.go @@ -204,6 +204,13 @@ func TestBackwardsCompatibilityConfig(t *testing.T) { manifest: `{"architecture":"amd64","config":{"Hostname":"e5e5b3910a57","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","DOCKER_BUCKET=get.docker.com","DOCKER_VERSION=1.10.3","DOCKER_SHA256=d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d"],"Cmd":["sh"],"ArgsEscaped":true,"Image":"sha256:bda352ba7ab5823b7dc74b380c5ad1699edee278a6d2ebbe451129b108778742","Volumes":null,"WorkingDir":"","Entrypoint":["docker-entrypoint.sh"],"OnBuild":[],"Labels":{}},"container":"881be788b4387039b52fa195da9fe26f264385aa497ce650cfdcf3806c2d2021","container_config":{"Hostname":"e5e5b3910a57","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","DOCKER_BUCKET=get.docker.com","DOCKER_VERSION=1.10.3","DOCKER_SHA256=d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d"],"Cmd":["/bin/sh","-c","#(nop) CMD [\"sh\"]"],"ArgsEscaped":true,"Image":"sha256:bda352ba7ab5823b7dc74b380c5ad1699edee278a6d2ebbe451129b108778742","Volumes":null,"WorkingDir":"","Entrypoint":["docker-entrypoint.sh"],"OnBuild":[],"Labels":{}},"created":"2016-06-08T00:52:29.30472774Z","docker_version":"1.10.3","history":[{"created":"2016-06-08T00:48:01.932532048Z","created_by":"/bin/sh -c #(nop) ADD file:bca92e550bd2ce926584aef2032464b6ebf543ce69133b6602c781866165d703 in /"},{"created":"2016-06-08T00:52:10.503417531Z","created_by":"/bin/sh -c apk add --no-cache \t\tca-certificates \t\tcurl \t\topenssl"},{"created":"2016-06-08T00:52:10.700704697Z","created_by":"/bin/sh -c #(nop) ENV DOCKER_BUCKET=get.docker.com","empty_layer":true},{"created":"2016-06-08T00:52:25.746175479Z","created_by":"/bin/sh -c #(nop) ENV DOCKER_VERSION=1.10.3","empty_layer":true},{"created":"2016-06-08T00:52:25.954613633Z","created_by":"/bin/sh -c #(nop) ENV DOCKER_SHA256=d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d","empty_layer":true},{"created":"2016-06-08T00:52:28.173693898Z","created_by":"/bin/sh -c curl -fSL \"https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION\" -o /usr/local/bin/docker \t\u0026\u0026 echo \"${DOCKER_SHA256} /usr/local/bin/docker\" | sha256sum -c - \t\u0026\u0026 chmod +x /usr/local/bin/docker"},{"created":"2016-06-08T00:52:28.924486515Z","created_by":"/bin/sh -c #(nop) COPY file:50006c902e7677711aeffe4ab7b7042d649618b96dec760f322a8566dd83ab25 in /usr/local/bin/"},{"created":"2016-06-08T00:52:29.121963047Z","created_by":"/bin/sh -c #(nop) ENTRYPOINT \u0026{[\"docker-entrypoint.sh\"]}","empty_layer":true},{"created":"2016-06-08T00:52:29.30472774Z","created_by":"/bin/sh -c #(nop) CMD [\"sh\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:77f08abee8bf9334407f52d104e1891283018450b3c196118ddfe31505126b87","sha256:707d16737060172b977d5f7eaaddfcfaae1008472193d7e8e5a01111a5f8dd5c","sha256:44da042e7b2458ee0b3877f2321cdf4fd45a49b9b51e00492c2ba68055573eff","sha256:1bc2be83dce13b9bac9476c9c1d2ca6e0db3e07b443f7298fc5a1af75b2cb4ef"]}}`, fail: false, }, + { + // fedora:23 from docker hub + // both Entrypoint and Cmd can be nullable + digest: "sha256:a20665eb1fe2912accb3d5dadaed360430df0d1aa46874875886947d61d3d4ee", + manifest: `{"architecture":"amd64","author":"Patrick Uiterwijk \u003cpatrick@puiterwijk.org\u003e","config":{"Hostname":"8dfe43d80430","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":null,"Image":"sha256:6986ae504bbf843512d680cc959484452034965db15f75ee8bdd1b107f61500b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"container":"6249cd2c4b1d6b1bf05903364cbcb95781508994d6407c1564d494e748ea1b41","container_config":{"Hostname":"8dfe43d80430","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) ADD file:293a6e463aa402bb8f80eb5cfc937f375cedc6843abaeb9eccfe3923bb3fc80b in /"],"Image":"sha256:6986ae504bbf843512d680cc959484452034965db15f75ee8bdd1b107f61500b","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2016-06-10T18:44:31.784795904Z","docker_version":"1.10.3","history":[{"created":"2016-06-10T18:44:03.360264073Z","author":"Patrick Uiterwijk \u003cpatrick@puiterwijk.org\u003e","created_by":"/bin/sh -c #(nop) MAINTAINER Patrick Uiterwijk \u003cpatrick@puiterwijk.org\u003e","empty_layer":true},{"created":"2016-06-10T18:44:31.784795904Z","author":"Patrick Uiterwijk \u003cpatrick@puiterwijk.org\u003e","created_by":"/bin/sh -c #(nop) ADD file:293a6e463aa402bb8f80eb5cfc937f375cedc6843abaeb9eccfe3923bb3fc80b in /"}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:d43f38155a799dc53d8fbb9f3bc11f51805f4027cd5c3d10b9823201cd5b9400"]}}`, + fail: false, + }, } { sum := sha256.Sum256([]byte(tt.manifest)) got := fmt.Sprintf("sha256:%s", hex.EncodeToString(sum[:])) diff --git a/serialization.md b/serialization.md index 6e6918805..3f037e4eb 100644 --- a/serialization.md +++ b/serialization.md @@ -283,7 +283,7 @@ Note: whitespace has been added to this example for clarity. Whitespace is OPTIO
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 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 @@ -291,7 +291,7 @@ Note: whitespace has been added to this example for clarity. Whitespace is OPTIO
Default arguments to the entry point 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. + 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".
Volumes struct