A container image needs to automatically extract a local tar archive file named 'app.tar.gz' into the destination directory '/opt/app' during the build process. Which instruction should be used?
You are troubleshooting a build where a RUN instruction fails because it cannot reach a remote URL to download a file. The local network uses an HTTP proxy. How should you pass the proxy settings to the build command without hardcoding them into the image?
You are writing a Containerfile and need to ensure that the default command executed when the container starts can be easily overridden by passing arguments on the podman run command line. Which instruction should you use?
You want to create a rigid container image where the container always executes a specific binary (/usr/bin/redis-server) and any arguments passed to 'podman run' are appended as arguments to that binary. Which instruction combination is best?
An auditor notices that a container image runs its main application process as the 'root' user by default. Which Containerfile instruction can be added to ensure the container runs as a non-privileged user named 'appuser'?
You need to label your container image with maintainer details and version metadata according to OCI annotation standards. Which instruction should you use?
You want to ensure that if any command in a multi-command RUN instruction fails, the entire container build process fails immediately. What shell option should be set or is default in Containerfiles?
When creating multi-architecture container images using podman build, how can you ensure that architecture-specific binaries are correctly handled when using instructions like COPY?
Which THREE advanced configuration steps or flags are available when performing rootless builds or utilizing buildah/podman build advanced features? (Choose three.)
A Containerfile contains the line `COPY app.conf /etc/myapp/app.conf`. During the build, podman reports that the file `app.conf` is not found even though it exists on the host machine in the same directory as the Containerfile. Which explanation best describes the cause?
A developer wants to build a container image using podman build, but the Containerfile is named 'Customfile' and located in a subdirectory named 'dockerfiles'. Which command accomplishes this?
You need to set a persistent environment variable named 'APP_PORT' with the value '8080' inside a container image via the Containerfile. Which instruction should you use?
You want to build an image that has a build-time argument named 'VERSION'. How do you declare this variable inside the Containerfile so it can be used during the build steps?
You are using a multi-stage build in your Containerfile. How do you copy a compiled binary named 'app' from a build stage named 'builder' into your final production runtime stage?
A developer needs to optimize image size by removing build caches and temporary package manager cache files within the same RUN instruction. Why must this be done in a single RUN instruction?
You need to ensure that a file copied into your image via the COPY instruction is owned by a specific user 'developer' and group 'devgroup'. How can this be achieved efficiently?
A developer has written a Containerfile with multiple COPY instructions for static configuration files that change frequently, placed near the top of the Containerfile before the application code installation. Why is this considered a bad practice for build caching?
You are building an image behind a corporate firewall that requires a custom Certificate Authority (CA) certificate to trust internal registries and repositories. How can you add this CA certificate to the build container?
You are building a minimal container image from scratch using 'FROM scratch'. Your statically compiled Go binary fails to execute when the container starts, with a 'file not found' error, even though it was successfully copied into the image. What is the most likely cause?
A developer wants to pass a secret API key during the container build process without leaving the secret exposed in image layers or history. Which Podman feature should be used?
You are optimizing image build times and notice that a specific RUN instruction fetching dependencies is re-running on every build, even though the requirements.txt file has not changed. What is causing this behavior?
Which TWO instructions in a Containerfile can be used to set metadata or default execution parameters that influence how a container runs? (Choose two.)
You need to ensure that a container image built with Podman includes reproducible timestamps for files to improve security and supply chain verification. Which flag or environment variable controls this?
Which THREE directives or practices are associated with implementing secure container builds and adhering to least-privilege principles? (Choose three.)
Which THREE practices should be observed when managing environment variables (ENV vs ARG) in Containerfiles for secure and efficient builds? (Choose three.)
You are writing a Containerfile to build a custom application image using podman build. Which instruction should you use as the mandatory first non-comment instruction to define the base image?
An administrator needs to execute a package update and install dependencies during the podman build process, ensuring these commands are committed as a new layer in the final image. Which instruction accomplishes this?
You need to copy local application source code from your build context into the /app directory inside the container image, automatically unpacking it if it is a local tar archive. Which instruction should you select?
By default, podman build executes build instructions using the root user. You want to switch the execution context to a non-privileged user named 'appuser' for all subsequent RUN, CMD, and ENTRYPOINT instructions. Which instruction should you use?
You want to set the working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions that follow it in the Containerfile. Which instruction achieves this?
You are designing a container image that runs an executable web server. You want to provide default arguments to the executable that can be easily overridden by a user passing arguments directly to 'podman run'. Which instruction combination is best?
You need to define a persistent environment variable named 'PORT' with the value '8080' that is available during both the build process and when running containers from the resulting image. Which instruction should you use?
You are optimizing a Containerfile for a Python application. The build currently uses a single RUN instruction that installs dependencies, runs tests, and cleans up temporary files. You want to leverage build caching to speed up rebuilds when only application code changes, while ensuring that dependency installation is cached separately. Which approach best achieves this?
You are reviewing a Containerfile for a web application. The Containerfile currently uses the shell form for its ENTRYPOINT instruction. You want to ensure that the application receives signals correctly and that arguments passed to `podman run` are properly forwarded to the application. Which TWO changes should you make? (Choose two.)
A developer builds a custom image with `podman build -t app:v1 .` but repeatedly gets stale results because an earlier RUN layer that installs packages is cached, even though the repository metadata has changed. The developer wants to force podman to ignore all cached layers for the next build without deleting the local image or build cache. Which command accomplishes this?
You are building an image with a multi-stage Containerfile. The final stage uses `FROM registry.access.redhat.com/ubi9/ubi-minimal` and you want to copy only the compiled binary from a builder stage named `builder` into `/usr/local/bin/app`. Which Containerfile line correctly copies that artifact?
A team wants to document ownership and contact information directly in the image so that `podman inspect` shows who maintains it. Which Containerfile instruction should they add to set this metadata?
You are writing a Containerfile for a Python web service. You want the image build to install dependencies and then run the service with predictable behavior across environments. Which TWO practices correctly apply build-time and runtime configuration in the Containerfile? (Choose two.)