Update Article “2023-04-11-fabriquer-des-conteneurs-légers-depuis-une-ci-cd”
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8bd287adf3
commit
ed2b11ee3e
1 changed files with 11 additions and 7 deletions
|
@ -103,7 +103,7 @@ skopeo --insecure-policy copy docker-archive:albatros.386.tar.gz oci:/tmp/oci/38
|
||||||
On va ensuite construire à la main le dossier multiarch :
|
On va ensuite construire à la main le dossier multiarch :
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
remkdir -p /tmp/oci/multi
|
mkdir -p /tmp/oci/multi
|
||||||
|
|
||||||
# on copie juste le fichier qui déclare la version de la spec "directory" de OCI
|
# on copie juste le fichier qui déclare la version de la spec "directory" de OCI
|
||||||
cp /tmp/oci/amd64/oci-layout /tmp/oci/multi/
|
cp /tmp/oci/amd64/oci-layout /tmp/oci/multi/
|
||||||
|
@ -112,12 +112,16 @@ cp /tmp/oci/amd64/oci-layout /tmp/oci/multi/
|
||||||
mkdir -p /tmp/oci/multi/blobs/sha256/
|
mkdir -p /tmp/oci/multi/blobs/sha256/
|
||||||
cp -r /tmp/oci/{386,arm,arm64,amd64}/blobs/sha256/* /tmp/oci/multi/blobs/sha256/
|
cp -r /tmp/oci/{386,arm,arm64,amd64}/blobs/sha256/* /tmp/oci/multi/blobs/sha256/
|
||||||
|
|
||||||
# on cré
|
# on recupere les blobs des manifests de chacune de nos images :
|
||||||
# on copie ces fichiers dans
|
for a in amd64 arm arm64 386; do
|
||||||
|
F=$(jq -r '.manifests[0].digest' /tmp/oci/$a/index.json|grep -Po '[0-9a-f]+$');
|
||||||
|
echo $a $'\t' $(stat -c %s /tmp/oci/$a/blobs/sha256/$F) $'\t' $F
|
||||||
|
done
|
||||||
|
# amd64 405 bc16dc0ab502dedbce06f16f51d46f7027271e20a378c7f2821bf5e000197523
|
||||||
|
# arm 405 6d9017b7292a7922b410db767a9418accc700d529c9202d3c0155de10dc330cf
|
||||||
|
# arm64 405 18a092e389b2ee93d8170fed24a39bf1af38d2d05d7b6ee107d3af50b17f7dd0
|
||||||
|
# 386 405 d88fd35b9c83baa3c8d61df4dc99a7c35346e493a2981d67d2d458652a5cac8f
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Maintenant il ne nous reste plus qu'à créer un manifeste depuis les informations qu'on a collecté !
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue