Add possibility to build with podman/buildah

In case of using cri-o as container engine we won't have docker binary
installed. Instead we should use podman (or buildah until podman's bug
is fixed). This commit implements that behavior based on value of
devstack-plugin-container's $CONTAINER_ENGINE value.

Change-Id: Ic3c7d355a455298f43e37fb2aceddfd1e7eefaf2
Implements: blueprint crio-support
This commit is contained in:
Michał Dulko 2018-11-29 09:37:38 +01:00
parent 0db1f30085
commit 2b5d401e26

View File

@ -2,7 +2,14 @@
function build_test_container {
pushd "${DEST}/kuryr-tempest-plugin/test_container"
docker build -t kuryr/demo . -f Dockerfile
# FIXME(dulek): Until https://github.com/containers/buildah/issues/1206 is
# resolved instead of podman we need to use buildah directly,
# hence this awful if clause.
if [[ ${CONTAINER_ENGINE} == 'crio' ]]; then
sudo buildah bud -t docker.io/kuryr/demo -f Dockerfile .
else
docker build -t kuryr/demo . -f Dockerfile
fi
popd
}