| 1 |
#!/bin/sh |
| 2 |
set -eux |
| 3 |
|
| 4 |
cd /var/tmp/ |
| 5 |
|
| 6 |
# bootc images have their own deployed image in a local registry |
| 7 |
podman run -d --rm --name ostree-registry -p 5000:5000 -v /var/lib/cockpit-test-registry/:/var/lib/registry localhost/test-registry |
| 8 |
|
| 9 |
# build updated bootc image with our RPMs |
| 10 |
podman build -t localhost/bootc-test --layers=false -f - . <<EOF |
| 11 |
FROM localhost:5000/bootc:latest |
| 12 |
COPY ./rpms /tmp/rpms |
| 13 |
RUN rpm --upgrade --verbose /tmp/rpms/*.rpm && rm -r /tmp/rpms |
| 14 |
COPY ./playground /usr/share/cockpit/playground |
| 15 |
EOF |
| 16 |
|
| 17 |
# deploy it |
| 18 |
bootc switch --transport containers-storage localhost/bootc-test |
| 19 |
|
| 20 |
# clean up |
| 21 |
podman rm -ft0 ostree-registry |
| 22 |
podman rmi localhost:5000/bootc localhost/bootc-test |
| 23 |
|
| 24 |
# ensure that we don't accidentally test with container |
| 25 |
podman rmi quay.io/cockpit/ws:latest |