build_and_register.sh
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 |