Projet

Général

Profil

build_and_register.sh

script pour construire l’image et l’envoyer sur le registre - Benjamin Bohard, 10/05/2023 11:45

Télécharger (300 octets)

 
1
#!/bin/bash
2

    
3
registry="pulp.eole.lan:5000"
4

    
5
podman build -t test . > container_build_log
6

    
7
container_id=$(tail -n1 container_build_log)
8

    
9
if [[ "$(podman images --format "{{.Id}}")" =~ "$container_id" ]]; then
10
	podman tag $container_id ${registry}/test:dev
11
	podman push ${registry}/test:dev
12
fi
13

    
14
exit 0