WorksheetsDevOps Quiz
Total questions: 60
Worksheet time: 30mins
Which type of credentials should be configured in Jenkins to access a GitHub repository?
Personal Access Token
API Key
Password in plain text
OAuth Token with read-write permissions
What does the following line of code mean in a Dockerfile? "FROM nginx:alpine"
Creating an Alpine Linux image and installs NGINX on it.
Starting a container running NGINX on an Alpine Linux base.
Asking Docker to pull the nginx image with the alpine tag from the Docker Hub.
Specifying the version of NGINX to be installed on the host system.
What does the “-p 8080:80” option do in a docker run command?
It specifies the image version to use.
It maps port 8080 on the host to port 80 on the container.
It runs the container on port 80.
It sets the container's internal port to 8080.
What is Docker Hub?
A local registry for Docker images
A cloud-based repository for Docker images
A Docker network management tool
A command-line tool for managing containers
What is Docker Compose used for?
Managing Docker images
Debugging containers
Defining and running multi-container Docker applications
Monitoring container performance
What type of repositories can be created in AWS CodeCommit?
Public and private repositories
Only public repositories
Only private repositories
Encrypted and unencrypted repositories
What is a Jenkins job?
A task allowing containers to run applications
A user role in the Jenkins system
A Jenkins plugin for deployment
A task or process defined in Jenkins to automate actions
Which type of job in Jenkins is commonly used for building and deploying software?
Freestyle Project
Multi-branch Pipeline
Pipeline
Folder
What is AWS CodePipeline used for?
Automating the build, test, and deployment phases of an application's release process.
Managing database migrations.
Monitoring application performance in production.
Hosting virtual machines for deployment.
Which file format does Docker Compose use for configuration?
XML
JSON
INI
YAML
What command is used to start a Docker Compose application?
docker-compose start
docker-compose up
docker-compose run
docker-compose build
What is Jenkins primarily used for?
Version control
Continuous Integration/Continuous Delivery (CI/CD)
Containerization of applications
Cloud storage
What is the default port for accessing the Jenkins web interface?
22
443
8080
80
What is the main purpose of a build trigger in Jenkins?
Defining environment variables
Specifying conditions for starting a build
To monitor system resources
To install required plugins
Which AWS service is commonly used to store application artifacts for deployment?
Amazon EC2
Amazon S3
AWS Lambda
Amazon CloudFront
Which condition must be met in order to remove a Docker container?
The container must be paused.
The container must be stopped.
The container must be part of a network.
The container must have no attached volumes.
What does the “docker exec” command do?
Starts a new Docker container.
Lists all running containers.
Runs a command inside a running Docker container.
Stops a running Docker container.
What is the default location of the Ansible configuration file?
/etc/ansible.cfg
/var/ansible.cfg
usr/local/ansible.cfg
/etc/ansible/ansible.cfg
What is the purpose of a tag in a Docker image?
Assign a version or identifier to a specific image variant.
Configure the network settings of the container.
Define environment variables in the image.
Store the image on a remote server.
Which tag is typically used to specify the latest version of a Docker image?
latest
last
stable
default
Can Docker tags include both letters and numbers?
No, tags can only contain letters.
Yes, tags can contain letters, numbers, and special characters.
No, tags can only contain numbers.
Yes, but only lowercase letters are allowed.
How do you push a Docker image to Docker Hub?
docker push <image_name>
docker push <username>/<image_name>:<tag>
docker upload <image_name>
docker deploy <image_name>:<tag>
What is the maximum number of public repositories allowed in a free Docker Hub account?
5
10
1
Unlimited
Which of the following would NOT be a valid entry in a .dockerignore file?
A file name like secrets.txt.
A folder path like node_modules/.
A wildcard pattern like *.log.
A command like RUN apt-get update.
What is the role of the services section in a Docker Compose file?
It defines all the cloud services settings that Docker will use.
It specifies the containers that should run in the application
It configures the volume mounts for the containers.
It defines environment variables for the containers.
In a Docker Compose file, how do you specify the image for a service?
Under the container field
Under the img field
Under the image field
Under the services field
Where can you find the initial admin password for Jenkins after installing it?
In a file called secrets/initialAdminPassword inside the Jenkins home directory.
In the config.xml file of Jenkins.
In a log file located at /var/log/jenkins/jenkins.log.
In the Jenkins UI under the "Admin Settings" section.
What is the purpose of the "Build Triggers" section in Jenkins?
Configuring the post-build actions
Triggering a notification after a build completes
Defining when a build should be triggered automatically
Managing the versioning of builds
Which option would you select in Jenkins to trigger the current project after another project completes a successful build?
"Build periodically"
"GitHub hook trigger for GITScm polling"
"Trigger for upstream projects"
"Build after other projects are built"
What is a "stage" in a Jenkins pipeline?
A group of steps within the pipeline that perform a specific function, such as build or test
A notification action for completed builds
A command to trigger the Jenkins build
A container for all Jenkins jobs
What is the purpose of a .dockerignore file in a Docker context?
To list all the Dockerfiles in a project.
To configure runtime settings for Docker containers.
To exclude files and directories from the Docker build context, improving build efficiency.
To specify the images that should not be pushed to Docker Hub.
Where should the .dockerignore file be placed in a project?
In the same directory as the Dockerfile.
In the user's home directory.
In the /etc/docker folder.
Inside the container's root directory.
How would you pull a specific version of an image from Docker Hub, such as nginx:1.19?
docker pull nginx:v1.19
docker pull nginx
docker pull nginx:1.19
docker pull nginx:latest
What happens if you do not specify a tag when pulling a Docker image?
Docker will pull the first available image.
Docker will pull the image without any version.
Docker will pull the image with the latest tag by default.
Docker will throw an error.
Which of the following defines how to link services together in Docker Compose?
links
volumes
network
depends_on
What happens when you run “docker pull ubuntu”?
Pulls the latest Ubuntu image from Docker Hub
Installs Ubuntu on the host system
Clones the Ubuntu GitHub repository
Creates a new Ubuntu container
What is required to push an image to Docker Hub?
An active Docker subscription
A specific license for the image
Admin privileges on the host
A Docker Hub account
What is AWS Cloud9 instance?
A virtual machine service for hosting web applications.
A cloud-based integrated development environment (IDE) that allows you to write, run, and debug code.
A cloud-based database management system.
A service for deploying containerized applications.
What are the main components of an AWS CodePipeline pipeline?
Code, Compile, Run
Input, Process, Output
Clone, Test, Release
Build, Test, Deploy
How do you expose a port from a container to the host in a Docker Compose file?
By specifying the port field under the service
By using the expose field
By setting the network field
By mapping ports using the ports field
What happens if a .dockerignore file is not included in a project?
Docker will generate a default .dockerignore file automatically.
The build will skip the ignored files by default.
Docker will fail to build the image.
All files in the build context will be included, potentially increasing the build time and image size.
Which file format is commonly used to define the configuration of a pipeline in AWS CodePipeline?
XML
TXT
JSON
CSV
What does the HTTPS (GRC) connectivity option in CodeCommit allow you to do?
Connect to CodeCommit repositories using SSH keys.
Automatically clone repositories to AWS Lambda.
Encrypt repository data at rest.
Connect to CodeCommit repositories over HTTPS with a credential helper.
How does Ansible connect to remote hosts by default?
HTTP
FTP
SSH
Telnet
How does the .dockerignore file improve Docker builds?
By excluding unnecessary files from the build, reducing transfer time and improving performance.
By prioritizing specific files for the Docker build process.
By caching frequently used files for faster builds.
How do you run an interactive shell session inside a running container using docker exec?
docker exec -d -t
docker exec
docker exec -t
docker exec -i -t
What happens if you run “docker exec
The command will execute on the host system.
Docker will create a new container.
An error will occur, stating the container does not exist.
The container will automatically start in the background.
What is the purpose of IaC in DevOps?
Automating software development processes
Managing and provisioning computing infrastructure through machine-readable definition files
Optimizing application performance
Automating deployment pipelines in CI/CD using code
Which of these commands is used to stop all services in a Docker Compose application?
docker-compose halt
docker-compose stop
docker-compose down
docker-compose exit
Which AWS service provides managed CI/CD pipelines?
AWS CloudFormation
AWS CodeBuild
AWS CodePipeline
AWS CodeDeploy
Which of the following is not a cloud service for Git?
Jenkins
CodeCommit
GitHub
GitLab
In order to configure your credentials to use for connecting a local repository to that of your GitHub account, which commands you must use? (Select TWO)
git config --global username <user-name>
git config --global user.email <user-email>
git config --global user.pw <user-password>
git config --global user.name <user-name>
What is the inventory file in Ansible used for?
Storing playbooks and tasks that will be executed
Listing the managed hosts and organize them into groups
Configuring Ansible plugins
Tracking changes to playbooks and storing playbook logs
What is the default name of a remote repository on a server?
default
remote
repo
origin
What does the command "git config --list" do?
Lists all available Git repositories.
Lists all branches in the current Git repository.
Lists all Git global variables and settings.
Lists all untracked files in the working directory.
How do you link your local Git repository to a remote GitHub repository?
Use the “git push” command.
Use the “git remote add” command.
Use the “git clone” command.
Use the “git pull” command.
Which command is used to run an Ansible playbook?
ansible-playbook
ansible-run
ansible-execute
ansible-deploy
What is the purpose of a pipeline in CI/CD?
Managing infrastructure resources
Automating code reviews
Visualizing the progress of development tasks
Automating the steps required to deploy software changes.
Which from the following are NOT CI/CD tools? (Select TWO)
GitLab CI/CD
CodeCommit
Jenkins
CloudFormation
GitHub Actions
What are common use cases for Docker containers? (Select TWO)
Application deployment and scaling
Creating isolated development environments
Managing project budgets
Performing automated integration
