15 lines
394 B
Bash
Executable File
15 lines
394 B
Bash
Executable File
#!/bin/bash
|
|
# Small script to build libvirtd-exporter using docker and export the resulting binary
|
|
|
|
set -e
|
|
docker build -t libvirtd-exporter .
|
|
|
|
# Start container with result
|
|
docker run --entrypoint sh -itd --name libvirtd-exporter libvirtd-exporter
|
|
|
|
# Extract build atifact to host
|
|
docker cp libvirtd-exporter:/libvirtd_exporter .
|
|
|
|
docker stop libvirtd-exporter
|
|
docker rm -f libvirtd-exporter
|