Outils pour utilisateurs

Outils du site


blog

Images conteneurs flatten - réduire la taille d'une image

Voir aussi :

  • regctl / regclient

Avec crane

Installation

Via asdf ou

tar xvf go-containerregistry.tar.gz
LICENSE
README.md
crane
gcrane
krane
Utilisation

Comme ça ne fonctionne pas avec tous les types de registries ne fonctionne pas, pour notre besoin nous allons en créer un basé sur docker.io/registry

podman run -d -p 5000:5000 --name registry docker.io/registry

Récupération de l'image

crane auth login artifact.acme.local
crane copy artifact.acme.local/dev-plop/app1:main localhost:5000/app1:main
# crane copy artifact.acme.local/dev-plop/app1:main localhost:5000/app1:main --platform linux/amd64
$ crane flatten localhost:5000/app1:main -t localhost:5000/app1:main-flat 
2026/07/31 18:26:01 pushed blob: sha256:ed9d23f3b49db213c07a6daeaf7a76405361dc92e24451068d6859d438dbd4ff 
2026/07/31 18:26:01 existing blob: sha256:ed9d23f3b49db213c07a6daeaf7a76405361dc92e24451068d6859d438dbd4ff
2026/07/31 18:26:01 pushed blob: sha256:209899dc89cf25b900a57f1a86d9db824f1f9399eab4a1ed53d3e6d18a5420e7
2026/07/31 18:26:01 localhost:5000/app1:main-flat: digest: sha256:63a460ab7df5fd87f10d07fbff9cc662bd61d71e86c7f52521ca3a80587831b5 size: 431
localhost:5000/app1@sha256:63a460ab7df5fd87f10d07fbff9cc662bd61d71e86c7f52521ca3a80587831b5

Récupération de l'image aplanie en local

podman pull --tls-verify=false localhost:5000/app1:main-flat

Comparaison de la taille

$ podman images
REPOSITORY                            TAG                    IMAGE ID      CREATED       SIZE
localhost:5000/app1                   main-flat              209899dc89cf  2 hours ago   2.53 GB
artifact.acme.local/dev-plop/app1     main                   c5cfb851b087  11 hours ago  5.04 GB
2026/08/03 11:16 · Jean-Baptiste

Contre DNS

Source : https://freenet.org/about/faq/#does-freenet-have-decentralized-domain-names-or-dns

Does Freenet have decentralized domain names or DNS?

Not currently, and mostly on purpose. Domain names do three different jobs: identification, human-readable naming, and discovery. We think DNS is the wrong fit for all three on a decentralized network.

  • Identification: Freenet identifies content and applications by contract hashes, which are content-addressed keys. They’re fully decentralized and cryptographically verifiable, but not human-friendly.
  • Human-readable naming: This is the problem captured by Zooko’s triangle: a name can be at most two of human-meaningful, secure, and decentralized. DNS gets memorability by being centralized. Freenet prefers local, personal naming instead: memorable nicknames each user keeps for the identities they care about, like the contacts list on your phone (a “petname” system). Because the names are personal rather than global, there’s no central registry to control and no race to squat every good name.
  • Discovery: “Find the thing I want” is really a search problem, not a naming one, and search and recommendation handle it better than a global namespace can. That’s what we’re designing in Atlas, a decentralized discovery layer that’s still at the design stage.

So Freenet has no direct equivalent of decentralized domain names, because we don’t think DNS is the right tool for either identification or discovery.

FIXME

2026/07/28 09:29 · Jean-Baptiste

Limiter la consommation de la RAM d'une application avec les cgroups slices

Source : https://unix.stackexchange.com/questions/499485/how-do-i-use-swap-space-for-emergencies-only

/home/jean/.config/systemd/user/mozilla.slice

[Unit]
Description=Slice for Mozilla apps
Before=slices.target
 
[Slice]
MemoryAccounting=yes
MemoryHigh=5G
MemoryMax=6G
systemd-run --user --slice mozilla.slice --scope -- /usr/bin/firefox &

FIXME

2026/07/28 05:29 · Jean-Baptiste

Procédure simple augmentation de la SWAP

Prérequis :

  • Les applications métiers doivent être arrêtées
  • Les commandes ci-dessous sont à faire en root
# Connaître l’état actuel de la RAM et du SWAP
free -m
 
# Localiser la partition SWAP
grep swap /etc/fstab
 
# Désactiver le SWAP
swapoff -a
 
# Redimensionner la partition SWAP
lvresize -L 4G /dev/vgsys01/lvswap
 
# Créer la zone d’échange SWAP
mkswap /dev/vgsys01/lvswap
 
# Activer le SWAP
swapon -a
 
# Vérifier
free -m
2026/07/17 15:49 · Jean-Baptiste
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki