Docker and CI/CD · Junior · Question 27 of 75

Inside a container, what does localhost refer to?

Explanation

Each container has its own network namespace. To reach a service on the host, Docker Desktop provides host.docker.internal; other containers are reached by name.

Further reading

Problem with a question

Docker and CI/CD · Junior · question 27

Test yourself

Take the Docker and CI/CD · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz