Complete the command to set a CPU limit of 0.5 cores for a Docker container.
docker run --cpus=[1] nginxThe --cpus flag sets the maximum number of CPUs the container can use. Here, 0.5 means half a CPU core.
Complete the command to reserve 0.25 CPU cores for a Docker container.
docker run --cpu-reservation=[1] nginxThe --cpu-reservation flag reserves CPU resources for the container. 0.25 means reserving a quarter of a CPU core.
Fix the error in the command to limit CPU usage to 1.5 cores.
docker run --cpus=[1] nginxThe CPU limit must be a decimal number with a dot, not a comma or other separator. So 1.5 is correct.
Fill both blanks to set a CPU limit of 2 cores and reserve 1 core for a Docker container.
docker run --cpus=[1] --cpu-reservation=[2] nginx
The --cpus flag sets the max CPU usage to 2 cores, and --cpu-reservation reserves 1 core for the container.
Fill all three blanks to run a container with CPU limit 1.2, CPU reservation 0.8, and name it 'webapp'.
docker run --cpus=[1] --cpu-reservation=[2] --name=[3] nginx
The command sets CPU limit to 1.2 cores, reserves 0.8 cores, and names the container 'webapp'.