ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 91 - DCA discussion

Report
Export

A users attempts to set the system time from inside a Docker container are unsuccessful. Could this be blocking this operation?

Solution: Linux capabilities

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: A

Explanation:

: = Linux capabilities are a way of restricting the privileges of a process or a container.By default, Docker containers run with a reduced set of capabilities, which means they cannot perform certain operations that require higher privileges, such as setting the system time1.To allow a container to set the system time, you need to grant it the SYS_TIME capability by using the--cap-addoption when running the container2.For example,docker run --cap-add SYS_TIME alpine date -s 12:00would set the system time to 12:00 inside the alpine container3.Reference:Docker Documentation,Runtime privilege and Linux capabilities,Change system date time in Docker containers without impacting host,Is it possible to change time dynamically in docker container?

asked 08/11/2024
marcio Gomes lobo
26 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first