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

container: self contained build script #63

Merged

Commits on Jan 30, 2023

  1. container: update build.sh with ability to install dependencies

    Most of the logic around building and testing sambacc was in the
    build.sh script already, so why not include the ability to install
    the os packages too.
    
    When called with `--install` as the first argument instead of a revision
    id, we assume that the script is being called specifically and only to
    install the package dependencies.
    
    Signed-off-by: John Mulligan <[email protected]>
    phlogistonjohn committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    50d4719 View commit details
    Browse the repository at this point in the history
  2. container: parameterize the sambacc containerfile

    Strip down the containerfile to the bare minimum, the base image, the
    build.sh script, and dependencies. Make the base image a build arg.
    Make the installation of the dependencies optional based on a build arg.
    
    This now makes it possible to more easily test and reuse the sambacc
    test (and build) container image for different base OSes. For example:
    
    ```
    podman build -t sambacc:mini36 --build-arg=SAMBACC_BASE_IMAGE=registry.fedoraproject.org/fedora:36 --build-arg=SAMBACC_MINIMAL=yes -f tests/container/Containerfile
    podman run --rm -it sambacc:mini36
    
    podman build -t sambacc:c9s -f tests/container/Containerfile
    
    podman build -t sambacc:mini9 --build-arg=SAMBACC_MINIMAL=yes -f tests/container/Containerfile
    
    podman build -t sambacc:fc37 --build-arg=SAMBACC_BASE_IMAGE=registry.fedoraproject.org/fedora:37 -f tests/container/Containerfile
    ```
    
    Signed-off-by: John Mulligan <[email protected]>
    phlogistonjohn committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    2c09da3 View commit details
    Browse the repository at this point in the history