<< Prev Question Next Question >>

Question 12/25

Before Making any changes build the Dockerfile with tag base:v1
Now Analyze and edit the given Dockerfile(based on ubuntu 16:04)
Fixing two instructions present in the file, Check from Security Aspect and Reduce Size point of view.
Dockerfile:
FROM ubuntu:latest
RUN apt-get update -y
RUN apt install nginx -y
COPY entrypoint.sh /
RUN useradd ubuntu
ENTRYPOINT ["/entrypoint.sh"]
USER ubuntu
entrypoint.sh
#!/bin/bash
echo "Hello from CKS"
After fixing the Dockerfile, build the docker-image with the tag base:v2

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Question List (25q)
1 commentQuestion 1: A container image scanner is set up on the cluster. Given an...
Question 2: SIMULATION Create a new NetworkPolicy named deny-all in the ...
Question 3: Context: Cluster: prod Master node: master1 Worker node: wor...
Question 4: Create a Pod name Nginx-pod inside the namespace testing, Cr...
Question 5: SIMULATION Before Making any changes build the Dockerfile wi...
Question 6: Context: Cluster: gvisor Master node: master1 Worker node: w...
Question 7: Using the runtime detection tool Falco, Analyse the containe...
Question 8: You can switch the cluster/configuration context using the f...
Question 9: On the Cluster worker node, enforce the prepared AppArmor pr...
Question 10: SIMULATION On the Cluster worker node, enforce the prepared ...
Question 11: SIMULATION Given an existing Pod named test-web-pod running ...
Question 12: Before Making any changes build the Dockerfile with tag base...
Question 13: SIMULATION Given an existing Pod named nginx-pod running in ...
Question 14: Cluster: dev Master node: master1 Worker node: worker1 You c...
Question 15: Create a PSP that will only allow the persistentvolumeclaim ...
Question 16: Service is running on port 389 inside the system, find the p...
Question 17: Create a RuntimeClass named untrusted using the prepared run...
Question 18: SIMULATION Using the runtime detection tool Falco, Analyse t...
Question 19: You must complete this task on the following cluster/nodes: ...
Question 20: SIMULATION Using the runtime detection tool Falco, Analyse t...
Question 21: SIMULATION use the Trivy to scan the following images, 1. am...
Question 22: Given an existing Pod named nginx-pod running in the namespa...
Question 23: Cluster: qa-cluster Master node: master Worker node: worker1...
Question 24: Fix all issues via configuration and restart the affected co...
Question 25: SIMULATION Enable audit logs in the cluster, To Do so, enabl...