Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gain a basic understanding of docker, how it works, integration with Windows Server, and how to get it set up on Windows Server 2016. #1

Open
mathewlk opened this issue Feb 4, 2017 · 7 comments
Assignees

Comments

@mathewlk
Copy link

mathewlk commented Feb 4, 2017

No description provided.

@mathewlk mathewlk self-assigned this Feb 4, 2017
@mathewlk
Copy link
Author

mathewlk commented Feb 7, 2017

How Docker for Windows works: https://docs.docker.com/docker-for-windows/
Docker for Windows Tutorial: https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/
Windows containers and Docker: https://www.simple-talk.com/cloud/platform-as-a-service/windows-containers-and-docker/

Seems like old Docker only ran on Linux, so Linux VM had to be installed on Windows machine, and then controlled through Windows. Now, Docker can run natively on Windows using native Hyper-V virtualization. Docker engine is what runs the containers, and the containers are what store individual applications for process separation.

@jessemillar
Copy link

At the time of this writing, the VM method is the sanctioned method for running Docker on Mac machines. I only mention this for the future benefit of people wanting to port Snap to Mac (if the Docker plugin doesn't already work on Mac).

@mathewlk
Copy link
Author

mathewlk commented Feb 8, 2017

In order to get Docker set up on Windows 2016 VM:
Start at https://docs.docker.com/docker-for-windows/#what-to-know-before-you-install -> Click on: Setup - Windows Server 2016 (Lab) -> Follow the instructions there (Install "Windows-native Docker Engine" instead of "Docker for Windows")

After this, I ran into error when trying to do 'docker version' command:
docker: error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.25/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..

Apparently, the Docker Engine should start automatically after installation, but it doesn't (MicrosoftDocs/Virtualization-Documentation#350). Use 'Start-Service docker' in Powershell to start it manually.

@mathewlk
Copy link
Author

mathewlk commented Feb 8, 2017

Continuing on with the Get Started with Windows for Docker, tried to run 'docker run hello-world', but got the error:
image operating system "linux" cannot be used on this platform.

According to https://docs.docker.com/docker-for-windows/troubleshoot/, if we install the native Windows binary (which allows us to develop and run Windows containers without Docker for Windows), we cannot develop or run Linux containers. That is why this error occurs. Something to look out for when first starting with Docker for Windows Server 2016.

@mathewlk
Copy link
Author

mathewlk commented Feb 8, 2017

From https://github.com/docker/labs/blob/master/windows/windows-containers/README.md, after setup, follow Getting Started with Windows Containers for specific instructions on how to use this native Docker binary.

@jessemillar
Copy link

Wait. Can Docker on Windows only run Windows containers?

@mathewlk
Copy link
Author

mathewlk commented Feb 8, 2017

That's what it seems like, at least for the Docker version made for Windows Server. At https://docs.docker.com/docker-for-windows/, it says that,
"The current version of Docker for Windows runs on 64bit Windows 10 Pro, Enterprise and Education (1511 November update, Build 10586 or later). In the future we will support more versions of Windows 10."
...which I guess means it won't run on Windows Server 2016? But then if you go to "https://docs.docker.com/docker-for-windows/#about-windows-containers-and-windows-server-2016 -> Click on: Switch between Windows and Linux containers", it seems like we should be able to switch between the two (with Docker for Windows v. 1.13.x+).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants