Quiz: Run Applications as Containers and Pods

Run Applications as Containers and Pods

Choose the correct answers to the following questions:

As the student user on the workstation machine, use Skopeo to log in to the registry.ocp4.example.com:8443 classroom container registry as the developer user with the developer password. Then, use the skopeo and oc image commands to answer the following questions.


  1. 1.

    Which command is executed in the registry.ocp4.example.com:8443/ubi8/php-74:latest container image?

    A

    httpd -D FOREGROUND

    B

    run-mysqld

    C

    php-fpm -D, httpd -D FOREGROUND

    D

    /bin/sh -c $STI_SCRIPTS_PATH/usage

    E

    /bin/sh -c php-fpm -D

  2. 2.

    Using the UID value for the registry.ocp4.example.com:8443/ubi8/php-74:latest container image, identify the two correct deployment scenarios. (Choose two.)

    A

    The container executes as the root privileged user when a regular OpenShift user account deploys it in a pod.

    B

    The container user UID value is 1001 when a regular OpenShift user account deploys it in a pod.

    C

    The container executes as a non-privileged user when it is deployed in a pod.

    D

    The container executes as the root privileged user when an OpenShift cluster administrator deploys it in a pod.

    E

    The container user UID value is 1001 when an OpenShift cluster administrator deploys it in a pod.

  3. 3.

    What is the ID/hash for the registry.ocp4.example.com:8443/rhel9/mysql-80:1-237 container image?

    A

    sha256:90b4…​a3a4

    B

    sha256:4243…​71a6

    C

    sha256:3843…​7caf

    D

    sha256:d282…​f38f

    E

    sha256:0027…​8c72

  4. 4.

    Which two environment variables and their values are specified in the registry.ocp4.example.com:8443/rhel8/postgresql-13:latest container image? (Choose two.)

    A

    NAME=PHP 7.4

    B

    APP_DATA=/opt/app-root/src/bin

    C

    HOME=/var/lib/pgsql

    D

    PHP_SYSCONF_FILE=/etc/

    E

    PGUSER=postgres

  5. 5.

    Which three tags are available for the registry.ocp4.example.com:8443/ubi8/ubi container image? (Choose three.)

    A

    v1

    B

    1

    C

    latest

    D

    8.1

    E

    8.4

    F

    1.8

    G

    8.0

  6. 6.

    Which two container images run as a privileged user when an OpenShift cluster administrator deploys a pod from the image? (Choose two.)

    A

    registry.ocp4.example.com:8443/rhel8/postgresql-13:latest

    B

    registry.ocp4.example.com:8443/ubi8/php-74:latest

    C

    registry.ocp4.example.com:8443/ubi8/nodejs-16:latest

    D

    registry.ocp4.example.com:8443/rhel8/mysql-80:latest

    E

    registry.ocp4.example.com:8443/ubi8/python-39

  7. 7.

    Which ports are exposed in the registry.ocp4.example.com:8443/rhel8/mysql-80 container image?

    A

    8080/tcp

    B

    3363/tcp

    C

    8443/tcp

    D

    3306/tcp

    E

    3360/tcp