docker-internals: tuto ready
This commit is contained in:
parent
5291bd365e
commit
de21be218a
7 changed files with 395 additions and 26 deletions
|
@ -33,6 +33,8 @@ souhaite récupérer le contenu du dépôt[^quiddepot] `hello-world` :
|
|||
```shell
|
||||
42sh$ curl "https://auth.docker.io/token"\
|
||||
> "?service=registry.docker.io&scope=repository:library/hello-world:pull" | jq .
|
||||
```
|
||||
```json
|
||||
{
|
||||
"token": "lUWXBCZzg2TGNUdmMy...daVZxGTj0eh",
|
||||
"access_token": "eyJhbGciOiJSUzI1NiIsI...N5q469M3ZkL_HA",
|
||||
|
@ -111,7 +113,8 @@ Enfin, armé du `digest` de notre couche, il ne nous reste plus qu'à la demande
|
|||
|
||||
<div lang="en-US">
|
||||
```shell
|
||||
wget --header "Authorization: Bearer ${TOKEN}" "https://registry-1.docker.io/v2/library/hello-world/blobs/${LAYER_DIGEST}"
|
||||
wget --header "Authorization: Bearer ${TOKEN}" \
|
||||
"https://registry-1.docker.io/v2/library/hello-world/blobs/${LAYER_DIGEST}"
|
||||
```
|
||||
</div>
|
||||
|
||||
|
@ -147,11 +150,14 @@ Réalisez un script pour automatiser l'ensemble de ces étapes :
|
|||
<div lang="en-US">
|
||||
```shell
|
||||
42sh$ cd $(mktemp)
|
||||
|
||||
42sh$ ~/workspace/registry_play.sh library/hello
|
||||
|
||||
42sh$ find
|
||||
.
|
||||
./rootfs
|
||||
./rootfs/hello
|
||||
|
||||
42sh# chroot rootfs /hello
|
||||
Hello from Docker!
|
||||
[...]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue