Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for FROM scratch containers #128

Closed
jdoss opened this issue May 10, 2019 · 2 comments
Closed

Support for FROM scratch containers #128

jdoss opened this issue May 10, 2019 · 2 comments

Comments

@jdoss
Copy link

jdoss commented May 10, 2019

I am looking to convert the following bash script over to an ansible playbook to use with ansible-bender. After digging a bit, I don't think there is any support for creating containers from scratch. Is that correct?

I have been calling this script with buldah unshare. My end goal is to write one playbook to support many different distros and versions and pass in extra_ vars to dictate what is built from scratch.

#!/usr/bin/env bash
set -o errexit

FEDORA_VERSION=29
CONTAINER=$(buildah from scratch)

MOUNTPOINT=$(buildah mount ${CONTAINER})

dnf install --disablerepo=* --enablerepo=fedora,updates \
            --installroot ${MOUNTPOINT} \
            --releasever ${FEDORA_VERSION} \
              glibc-minimal-langpack bash coreutils dnf procps-ng vi \
            --nodocs \
            --setopt install_weak_deps=false -y
dnf -y clean all --installroot=${MOUNTPOINT}

buildah config --author joe@example.biz \
               --user 1001 ${CONTAINER}

buildah commit ${CONTAINER} localhost/fedora:${FEDORA_VERSION}

buildah unmount ${CONTAINER}
buildah rm ${CONTAINER}```
@TomasTomecek
Copy link
Collaborator

We are already tracking a very similar feature request over here: #49

@jdoss
Copy link
Author

jdoss commented May 14, 2019

Thanks @TomasTomecek for your response. I'll close this issue in favor of #49.

@jdoss jdoss closed this as completed May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants