Browse code

Add a little description of the image tarball format.

Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)

Sven Dowideit authored on 2014/09/16 15:43:08
Showing 8 changed files
... ...
@@ -1243,6 +1243,8 @@ Status Codes:
1243 1243
 Get a tarball containing all images and metadata for the repository
1244 1244
     specified by `name`.
1245 1245
 
1246
+See the [image tarball format](#image-tarball-format) for more details.
1247
+
1246 1248
 **Example request**
1247 1249
 
1248 1250
         GET /images/ubuntu/get
... ...
@@ -1265,6 +1267,8 @@ Status Codes:
1265 1265
 
1266 1266
 Load a set of images and tags into the docker repository.
1267 1267
 
1268
+See the [image tarball format](#image-tarball-format) for more details.
1269
+
1268 1270
 **Example request**
1269 1271
 
1270 1272
         POST /images/load
... ...
@@ -1280,6 +1284,27 @@ Status Codes:
1280 1280
 -   **200** – no error
1281 1281
 -   **500** – server error
1282 1282
 
1283
+### Image tarball format
1284
+
1285
+An image tarball contains one directory per image layer (named using its long ID),
1286
+each containing three files:
1287
+
1288
+1. `VERSION`: currently `1.0` - the file format version
1289
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1290
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1291
+
1292
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1293
+for storing attribute changes and deletions.
1294
+
1295
+If the tarball defines a repository, there will also be a `repositories` file at
1296
+the root that contains a list of repository and tag names mapped to layer IDs.
1297
+
1298
+```
1299
+{"hello-world":
1300
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1301
+}
1302
+```
1303
+
1283 1304
 # 3. Going further
1284 1305
 
1285 1306
 ## 3.1 Inside `docker run`
... ...
@@ -1277,6 +1277,8 @@ Status Codes:
1277 1277
 Get a tarball containing all images and metadata for the repository
1278 1278
 specified by `name`.
1279 1279
 
1280
+See the [image tarball format](#image-tarball-format) for more details.
1281
+
1280 1282
 **Example request**
1281 1283
 
1282 1284
         GET /images/ubuntu/get
... ...
@@ -1299,6 +1301,8 @@ Status Codes:
1299 1299
 
1300 1300
 Load a set of images and tags into the docker repository.
1301 1301
 
1302
+See the [image tarball format](#image-tarball-format) for more details.
1303
+
1302 1304
 **Example request**
1303 1305
 
1304 1306
         POST /images/load
... ...
@@ -1314,6 +1318,27 @@ Status Codes:
1314 1314
 -   **200** – no error
1315 1315
 -   **500** – server error
1316 1316
 
1317
+### Image tarball format
1318
+
1319
+An image tarball contains one directory per image layer (named using its long ID),
1320
+each containing three files:
1321
+
1322
+1. `VERSION`: currently `1.0` - the file format version
1323
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1324
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1325
+
1326
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1327
+for storing attribute changes and deletions.
1328
+
1329
+If the tarball defines a repository, there will also be a `repositories` file at
1330
+the root that contains a list of repository and tag names mapped to layer IDs.
1331
+
1332
+```
1333
+{"hello-world":
1334
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1335
+}
1336
+```
1337
+
1317 1338
 # 3. Going further
1318 1339
 
1319 1340
 ## 3.1 Inside `docker run`
... ...
@@ -1342,6 +1342,8 @@ Status Codes:
1342 1342
 Get a tarball containing all images and metadata for the repository
1343 1343
 specified by `name`.
1344 1344
 
1345
+See the [image tarball format](#image-tarball-format) for more details.
1346
+
1345 1347
 **Example request**
1346 1348
 
1347 1349
         GET /images/ubuntu/get
... ...
@@ -1363,6 +1365,7 @@ Status Codes:
1363 1363
 `POST /images/load`
1364 1364
 
1365 1365
 Load a set of images and tags into the docker repository.
1366
+See the [image tarball format](#image-tarball-format) for more details.
1366 1367
 
1367 1368
 **Example request**
1368 1369
 
... ...
@@ -1379,6 +1382,27 @@ Status Codes:
1379 1379
 -   **200** – no error
1380 1380
 -   **500** – server error
1381 1381
 
1382
+### Image tarball format
1383
+
1384
+An image tarball contains one directory per image layer (named using its long ID),
1385
+each containing three files:
1386
+
1387
+1. `VERSION`: currently `1.0` - the file format version
1388
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1389
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1390
+
1391
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1392
+for storing attribute changes and deletions.
1393
+
1394
+If the tarball defines a repository, there will also be a `repositories` file at
1395
+the root that contains a list of repository and tag names mapped to layer IDs.
1396
+
1397
+```
1398
+{"hello-world":
1399
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1400
+}
1401
+```
1402
+
1382 1403
 # 3. Going further
1383 1404
 
1384 1405
 ## 3.1 Inside `docker run`
... ...
@@ -1340,6 +1340,8 @@ Status Codes:
1340 1340
 Get a tarball containing all images and metadata for the repository
1341 1341
 specified by `name`.
1342 1342
 
1343
+See the [image tarball format](#image-tarball-format) for more details.
1344
+
1343 1345
 **Example request**
1344 1346
 
1345 1347
         GET /images/ubuntu/get
... ...
@@ -1362,6 +1364,8 @@ Status Codes:
1362 1362
 
1363 1363
 Load a set of images and tags into the docker repository.
1364 1364
 
1365
+See the [image tarball format](#image-tarball-format) for more details.
1366
+
1365 1367
 **Example request**
1366 1368
 
1367 1369
         POST /images/load
... ...
@@ -1377,6 +1381,27 @@ Status Codes:
1377 1377
 -   **200** – no error
1378 1378
 -   **500** – server error
1379 1379
 
1380
+### Image tarball format
1381
+
1382
+An image tarball contains one directory per image layer (named using its long ID),
1383
+each containing three files:
1384
+
1385
+1. `VERSION`: currently `1.0` - the file format version
1386
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1387
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1388
+
1389
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1390
+for storing attribute changes and deletions.
1391
+
1392
+If the tarball defines a repository, there will also be a `repositories` file at
1393
+the root that contains a list of repository and tag names mapped to layer IDs.
1394
+
1395
+```
1396
+{"hello-world":
1397
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1398
+}
1399
+```
1400
+
1380 1401
 # 3. Going further
1381 1402
 
1382 1403
 ## 3.1 Inside `docker run`
... ...
@@ -1352,6 +1352,8 @@ Status Codes:
1352 1352
 Get a tarball containing all images and metadata for the repository
1353 1353
 specified by `name`.
1354 1354
 
1355
+See the [image tarball format](#image-tarball-format) for more details.
1356
+
1355 1357
 **Example request**
1356 1358
 
1357 1359
         GET /images/ubuntu/get
... ...
@@ -1373,6 +1375,7 @@ Status Codes:
1373 1373
 `POST /images/load`
1374 1374
 
1375 1375
 Load a set of images and tags into the docker repository.
1376
+See the [image tarball format](#image-tarball-format) for more details.
1376 1377
 
1377 1378
 **Example request**
1378 1379
 
... ...
@@ -1389,6 +1392,27 @@ Status Codes:
1389 1389
 -   **200** – no error
1390 1390
 -   **500** – server error
1391 1391
 
1392
+### Image tarball format
1393
+
1394
+An image tarball contains one directory per image layer (named using its long ID),
1395
+each containing three files:
1396
+
1397
+1. `VERSION`: currently `1.0` - the file format version
1398
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1399
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1400
+
1401
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1402
+for storing attribute changes and deletions.
1403
+
1404
+If the tarball defines a repository, there will also be a `repositories` file at
1405
+the root that contains a list of repository and tag names mapped to layer IDs.
1406
+
1407
+```
1408
+{"hello-world":
1409
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1410
+}
1411
+```
1412
+
1392 1413
 # 3. Going further
1393 1414
 
1394 1415
 ## 3.1 Inside `docker run`
... ...
@@ -1359,6 +1359,8 @@ If `name` is a specific name and tag (e.g. ubuntu:latest), then only that image
1359 1359
 image (and its parents) are returned, but with the exclusion of the
1360 1360
 'repositories' file in the tarball, as there were no image names referenced.
1361 1361
 
1362
+See the [image tarball format](#image-tarball-format) for more details.
1363
+
1362 1364
 **Example request**
1363 1365
 
1364 1366
         GET /images/ubuntu/get
... ...
@@ -1386,6 +1388,7 @@ ubuntu:latest), then only that image (and its parents) are returned; if it is
1386 1386
 an image ID, similarly only that image (and its parents) are returned and there
1387 1387
 would be no names referenced in the 'repositories' file for this image ID.
1388 1388
 
1389
+See the [image tarball format](#image-tarball-format) for more details.
1389 1390
 
1390 1391
 **Example request**
1391 1392
 
... ...
@@ -1408,6 +1411,7 @@ Status Codes:
1408 1408
 `POST /images/load`
1409 1409
 
1410 1410
 Load a set of images and tags into the docker repository.
1411
+See the [image tarball format](#image-tarball-format) for more details.
1411 1412
 
1412 1413
 **Example request**
1413 1414
 
... ...
@@ -1424,6 +1428,27 @@ Status Codes:
1424 1424
 -   **200** – no error
1425 1425
 -   **500** – server error
1426 1426
 
1427
+### Image tarball format
1428
+
1429
+An image tarball contains one directory per image layer (named using its long ID),
1430
+each containing three files:
1431
+
1432
+1. `VERSION`: currently `1.0` - the file format version
1433
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1434
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1435
+
1436
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1437
+for storing attribute changes and deletions.
1438
+
1439
+If the tarball defines a repository, there will also be a `repositories` file at
1440
+the root that contains a list of repository and tag names mapped to layer IDs.
1441
+
1442
+```
1443
+{"hello-world":
1444
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1445
+}
1446
+```
1447
+
1427 1448
 # 3. Going further
1428 1449
 
1429 1450
 ## 3.1 Inside `docker run`
... ...
@@ -1205,6 +1205,7 @@ Status Codes:
1205 1205
 
1206 1206
 Get a tarball containing all images and metadata for the repository
1207 1207
 specified by `name`.
1208
+See the [image tarball format](#image-tarball-format) for more details.
1208 1209
 
1209 1210
 **Example request**
1210 1211
 
... ...
@@ -1228,6 +1229,8 @@ Status Codes:
1228 1228
 
1229 1229
 Load a set of images and tags into the docker repository.
1230 1230
 
1231
+See the [image tarball format](#image-tarball-format) for more details.
1232
+
1231 1233
 **Example request**
1232 1234
 
1233 1235
         POST /images/load
... ...
@@ -1243,6 +1246,27 @@ Status Codes:
1243 1243
 -   **200** – no error
1244 1244
 -   **500** – server error
1245 1245
 
1246
+### Image tarball format
1247
+
1248
+An image tarball contains one directory per image layer (named using its long ID),
1249
+each containing three files:
1250
+
1251
+1. `VERSION`: currently `1.0` - the file format version
1252
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1253
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1254
+
1255
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1256
+for storing attribute changes and deletions.
1257
+
1258
+If the tarball defines a repository, there will also be a `repositories` file at
1259
+the root that contains a list of repository and tag names mapped to layer IDs.
1260
+
1261
+```
1262
+{"hello-world":
1263
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1264
+}
1265
+```
1266
+
1246 1267
 # 3. Going further
1247 1268
 
1248 1269
 ## 3.1 Inside `docker run`
... ...
@@ -1240,6 +1240,8 @@ Status Codes:
1240 1240
 
1241 1241
 Get a tarball containing all images and metadata for the repository specified by `name`.
1242 1242
 
1243
+See the [image tarball format](#image-tarball-format) for more details.
1244
+
1243 1245
 **Example request**
1244 1246
 
1245 1247
         GET /images/ubuntu/get
... ...
@@ -1262,6 +1264,8 @@ Status Codes:
1262 1262
 
1263 1263
 Load a set of images and tags into the docker repository.
1264 1264
 
1265
+See the [image tarball format](#image-tarball-format) for more details.
1266
+
1265 1267
 **Example request**
1266 1268
 
1267 1269
         POST /images/load
... ...
@@ -1277,6 +1281,27 @@ Status Codes:
1277 1277
 -   **200** – no error
1278 1278
 -   **500** – server error
1279 1279
 
1280
+### Image tarball format
1281
+
1282
+An image tarball contains one directory per image layer (named using its long ID),
1283
+each containing three files:
1284
+
1285
+1. `VERSION`: currently `1.0` - the file format version
1286
+2. `json`: detailed layer information, similar to `docker inspect layer_id`
1287
+3. `layer.tar`: A tarfile containing the filesystem changes in this layer
1288
+
1289
+The `layer.tar` file will contain `aufs` style `.wh..wh.aufs` files and directories
1290
+for storing attribute changes and deletions.
1291
+
1292
+If the tarball defines a repository, there will also be a `repositories` file at
1293
+the root that contains a list of repository and tag names mapped to layer IDs.
1294
+
1295
+```
1296
+{"hello-world":
1297
+    {"latest":"565a9d68a73f6706862bfe8409a7f659776d4d60a8d096eb4a3cbce6999cc2a1"}
1298
+}
1299
+```
1300
+
1280 1301
 # 3. Going further
1281 1302
 
1282 1303
 ## 3.1 Inside `docker run`