Skip to content

Commit

Permalink
Merge pull request #50 from pabrahamsson/ubi_prune_image
Browse files Browse the repository at this point in the history
Update buildah.sh to use fewer lines
  • Loading branch information
tylerauerbeck authored May 29, 2020
2 parents 92aa779 + 54a698f commit 80bfe7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions images/prune-ocp-projects/buildah.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ set -o errexit
container=$(buildah from registry.access.redhat.com/ubi8/ubi)
buildah config --label io.k8s.description="OCP Project Pruner" --label io.k8s.display-name="OCP Project Pruner" --env PATH='$PATH:/usr/local/bin' $container
buildah add $container include/prune-ocp-projects.sh /usr/local/bin/
buildah run $container -- curl -Lo /tmp/oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.4/linux/oc.tar.gz
buildah run $container -- tar -C /usr/local/bin/ -xzf /tmp/oc.tar.gz
buildah run $container -- rm /tmp/oc.tar.gz
buildah run $container -- bash -c 'curl -L https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.4/linux/oc.tar.gz | tar -C /usr/local/bin -xzf -'
buildah config --cmd /usr/local/bin/prune-ocp-projects.sh $container

buildah commit $container prune-ocp-projects:latest

0 comments on commit 80bfe7c

Please sign in to comment.