4.7. Running noninteractive builds with gcc-toolset-15


To perform noninteractive builds, run the gcc-toolset-15 image with a predefined build script that exits upon completion.

In CI systems, you can integrate this pattern by running podman run as part of a pipeline step. Use pipeline variables or configuration files to provide the values for <REGISTRY>, <NAMESPACE>, <TAG>, and host paths.

Ensure build scripts write logs and artifacts to host-mounted directories. This practice enables CI systems and administrators to inspect outputs after the container exits and to archive them as needed.

Prerequisites

  • The gcc-toolset-15 image is available locally.
  • A host directory for source and build scripts, for example, /srv/src.
  • A host directory for build output, for example, /srv/build-output.
  • A build script, for example, build.sh, that runs GCC Toolset 15 commands.

Procedure

  1. Prepare your build workflow. Ensure both the source and output directories on the host have appropriate permissions.
  2. Run the container in noninteractive mode:

    $ podman run --rm -v /srv/src:/src -v /srv/build-output:/build-output -w /src <REGISTRY> / <NAMESPACE> /gcc-toolset-15: <TAG>  /src/build.sh

    In this example:

    • /src/build.sh is a script inside the container that performs the build.
    • Build artifacts and logs are written to /build-output, which maps to /srv/build-output on the host.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部