Docker Host And Other Fundamental Questions

I am new to Docker. And have few easy questions hope you could help.

I have a windows 10 machine which installed “docker for windows”. In its HyperV manager I could see a virtual machine called “MobyLinuxVM”.

  • Docker-compose up creates container but coudn't start it
  • How can I combine ENV statement in Dockerfile?
  • Does Azure Service Fabric do the same thing as Docker?
  • Best way to get latest git code with Docker image restart?
  • .dockerignore all subfolders but not files in the folder itself
  • Redirecting command output in docker
  • So my questions are:

    1, When people talking about “Docker Host” and “Docker Engine”, what are they according to my situation?

    — I assume “Docker Host” should be my windows PC, and “Docker Engine” is that Virtual machine inside Hyper-V.

    2, If I use ipconfig to see my PC, I will find I got at lease 2 networks and IP addresses:

      (a) Lan Adapter -- show my IP is 192.168.xxx.yyy
    
      (b) DockerNAT -- show my IP is 10.0.75.1
    

    Then when I try to use dock-compose.yml to create container, I found I could ONLY use:

    environment:
    
    - MAGENTO_HOST=10.0.75.2 
    
    - MARIADB_HOST=10.0.75.2
    

    to create container and can be directly accessed (e.g. via browser to Magento website). So question is:

    If my machine is 10.0.75.1 within Docker network, then what is 10.0.75.2? why I cannot use e.g. 10.0.75.3?

    3, My yml script actually contains multiple containers creation — e.g. 2 Magento containers + 2 MariaDB containers + etc. When I specify their docker ‘HOST’, why it’s not my machine? (If we call my machine to be ‘docker host’ & hyper-v virtual image to be ‘docker engine’ in my 1st question.)

    4, Also according to my 3rd question, I current deploy all containers within 1 host. Is it worth to use Docker Swarm which people can use to cluster multiple Docker hosts? If so, does that mean I need to use Hyper-V to create another “MobyLinuxVM”?

    Thanks a lot!

  • Is second value required when mapping ports in docker-compose file?
  • Docker Port Detection
  • How can i include volume data in docker image
  • How to Enable Systemd service in openshift/jenkins-1-centos7 docker container?
  • Running Jenkins tests in Docker containers build from dockerfile in codebase
  • Docker run centos6 command fails
  • One Solution collect form web for “Docker Host And Other Fundamental Questions”

    1 Docker Engine + Docker Host

    The Docker Engine is the group of processes that manage Docker containers. dockerd is usually the head of that process tree.

    The Docker Host is the OS running Docker engine, that is MobyLinuxVM

    Your VM host is your Windows box.

    2 Docker Host IP

    10.0.75.2 is most likely the address assigned to MobyLinuxVM. I don’t run Docker for Windows so can’t entirely confirm but searching the web seems to back this up.

    3 – see 1

    4 Swarm

    You would need to run multiple VMs to setup swarm. Docker machine is the tool to use when setting up swarm instances. It allows you to manage multiple Docker instances and comes with a HyperV driver.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.