Commit 3f889585 authored by opuk's avatar opuk

ubi

parent 75163256
#!/bin/bash
set -o errexit
# Create a container
container=$(buildah from registry.access.redhat.com/ubi7/ubi-minimal)
buildah run --net host $container microdnf update -y
buildah run --net host $container rpm -ivh https://dl.fedoraproject.org/pub/epel/7Server/x86_64/Packages/e/epel-release-7-11.noarch.rpm
buildah run --net host $container microdnf install openssh-clients ansible python2-winrm python2-pip gcc python-devel git -y
#buildah run --net host $container microdnf install openssh-clients ansible python2-winrm python3-kerberos python3-pip gcc python-devel git python-netattr -y
#buildah run --net host $container pip install openstacksdk molecule
buildah run --net host $container pip install openstacksdk
buildah run $container microdnf remove gcc python-devel -y
buildah run $container microdnf clean all
buildah config --volume /work $container
buildah config --workingdir /work $container
# Finally saves the running container to an image
#buildah commit --format docker $container hello:latest
buildah commit $container quay.io/opuk/ansible:minimal
buildah push quay.io/opuk/ansible:minimal
#!/bin/bash
set -o errexit
# Create a container
container=$(buildah from registry.access.redhat.com/ubi7/ubi)
buildah run --net host $container yum update -y
buildah run --net host $container yum install https://dl.fedoraproject.org/pub/epel/7Server/x86_64/Packages/e/epel-release-7-12.noarch.rpm -y
buildah run --net host $container yum install openssh-clients ansible python2-winrm python2-kerberos python2-pip gcc python-devel git python-netattr -y
#buildah run --net host $container pip install openstacksdk molecule
buildah run --net host $container pip install openstacksdk
buildah run $container yum autoremove gcc python-devel -y
buildah run $container yum clean all
buildah config --volume /work $container
buildah config --workingdir /work $container
# Finally saves the running container to an image
#buildah commit --format docker $container hello:latest
buildah commit $container quay.io/opuk/ansible:latest
buildah push quay.io/opuk/ansible:latest
skopeo copy docker://quay.io/opuk/ansible:latest docker://quay.io/opuk/ansible:$(date -I)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment