[一日30分 인생승리의 학습법] How to Run :  Linux Containers on Windows Server 2019

How to Run ???? Linux Containers on Windows Server 2019

Save to My DOJO

How to Run ???? Linux Containers on Windows Server 2019

Hello again everyone! This article will serve as part 5 of our “Definitive Guide to Containers for MSPs” series. Once again, this series is focusing on the new containerization technologies entering the industry today and looking at them through the lens of an MSP.

Thus far we’ve done quite a bit of how-to, and we’re going to continue to work on the how-to question for the next few segments. The reason being, when we start talking about things like pricing, service delivery, and on-going support, you need to have a strong grasp of what’s involved in the platform, so you can make informed decisions at that point. With that in mind we’re going to look at docker itself for another segment or two, and then we’ll start getting into container orchestrators like Kubernetes.

Let’s see what we’ve talked about thus far.

The Definitive Guide to Containers for MSPs

Part 1 – What are Containers?

Part 2 – Platforms for Running Containerized Workloads

Part 3 – Introduction to Docker

Part 4 – 4 Pro Tips when Working with Docker

For this segment specifically, I wanted to cover how to run Linux containers on Windows Server 2019. I came up with this idea as I was prepping for our latest webinar that centered around demos with Windows Server 2019. While it’s easy enough to run containers on Windows 10 as we did in Part 3, it’s more difficult to do it on a VM where there is no GUI, and you can’t simply install docker for Windows.

So, let’s take a look at how the installation process works, and then we’ll proceed with running a container on top of it. Once this is complete, you’ll have everything you need to run Linux and Windows containers on Windows Server (assuming you’ve read the previous segments. Let’s get Started.

How to Install Docker Enterprise Edition Preview on Windows Server 2019

In prepping for this article, I started with a freshly installed Windows Server 2019 box. I used the GA Evaluation media to install the OS, then I upgraded to the latest Nov. build using Windows Update. In our previous segments we installed the Community edition of Docker. For this particular feature, we need to install Docker Enterprise Edition and the preview release at that.

First off, if you’re using the same box as you did in previous segments you’ll want to remove the version of Docker we installed with the DockerMSFTProvider in PowerShell.

NOTE: If you’re starting with a fresh server you can skip this step.

To Remove the previous version of Docker run the below command in an elevated PowerShell window:

Uninstall-Package -Name docker -ProviderName DockerMSFTProvider

Then reboot the box.

Now that we have a clean slate we can install the needed version of Docker to run Linux Containers. You can walk through the how-to below, or scroll down to watch the video.

NOTE: We’re going to be installing a testing build of the docker engine. While it’s fine for testing and learning, I would highly suggest waiting until a stable version is released prior to using it in production.

NOTE: It is required to have the Hyper-V Role installed in order to install the Docker Enterprise Edition preview. If this is a testing VM, make sure you enable nested virtualization.

To install the current preview build of Docker Enterprise Edition we need to run the below:

Install-Module DockerProvider

Then

Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview

Reboot your machine once again.

See it in action!

Installing_DockerEE.gif

 

How to Configure Docker Enterprise Edition to Run Linux Containers

Out of the box, this install of Docker will run Windows Containers. In order to switch back and forth between Windows and Linux containers you need to run the below commands:

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

To switch to Linux Containers

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")
Restart-Service docker

To switch back to Windows Containers

[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", $null, "Machine")
Restart-Service docker

Simply switch to whichever mode meets your needs at the given time.

Running Linux Containers on Windows Server 2019

After installing the Docker Enterprise Edition Preview and configuring it to run Linux containers we can use some of the syntax that we covered in previous sections to pull and run a container

Assuming you’ve switch to Linux mode, the below should work. Let’s first pull the latest Debian Linux container image:

NOTE: You can walk through the how to below, or scroll down to watch the video

Docker pull Debian

Then let’s run it in interactive mode and run a text-based app really quick just to make sure it works.

Docker run -it --name Debian_test Debian

Once in the prompt running the below will show us which version of the linux kernel is in use

Uname -r

Finally let’s install elinks, a text based web browser, using Debian’s packaging utility Apt

Apt-get update

Apt-get install elinks

Then let’s open google in elinks:

Elinks https://www.google.com

Hopefully, it should be working!

See it in Action!

Debian_Container_Test.gif

 

Wrap-Up

There you have it! You’ve successfully run a Linux container on top of Windows Server 2019. Pairing this with what we’ve done in the previous segments should have you prepared to run both Windows and Linux containers with docker. Knowing this, we’ll cover just a few more advanced docker items in the next post before getting into container orchestrators.

If you had troubles with this or have questions on use-case, or just have a general comment, be sure to let me know in the comments section below!

Until next time!

 

[출처] https://www.altaro.com/msp-dojo/linux-containers-windows-server-2019/

 

 

 

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
1051 [분석 및 설계] DDD 핵심만 빠르게 이해하기 file 졸리운_곰 2021.11.17 63
1050 [github] Awesome-crawler 멋진 웹 크롤러 프로젝트 졸리운_곰 2021.11.09 12
1049 [인공지능] 지식표현과 추론 file 졸리운_곰 2021.11.07 16
1048 File Encodeing Converter (파일 인코딩 일괄 변환기) file 졸리운_곰 2021.10.02 10
1047 CLIPS 6.0 User's Guide May 28, 1993 by Joseph C. Giarratano, Ph.D. file 졸리운_곰 2021.09.28 8
1046 [一日30分 인생승리의 학습법] [알쓸IT잡] 가상현실(VR), 증강현실(AR), 혼합현실(MR)을 아우르는 확장현실(XR, eXtended Reality) file 졸리운_곰 2021.09.23 16
1045 스프레드시트를 생산성 도구로...'구글 테이블' A to Z file 졸리운_곰 2021.09.17 11
1044 칼럼 | 하둡의 실패 넘어선다··· 오픈 데이터 분야를 견인하는 4가지 기술 동향 file 졸리운_곰 2021.09.17 6
1043 [一日30分 인생승리의 학습법] REST API 제대로 알고 사용하기 file 졸리운_곰 2021.09.06 13
1042 데이터를 가치있는 ‘자산’으로 만들기··· '5가지 지침' Martha Heller | CIO file 졸리운_곰 2021.09.02 13
1041 [CIOKorea] 데이터를 가치있는 '자산'으로 만들기 - '5가지 지침' 졸리운_곰 2021.09.02 7
1040 [一日30分 인생승리의 학습법] 짱 멋진 "머신러닝 라이브러리" 정리 file 졸리운_곰 2021.08.27 22
1039 Gitlab - SSL 적용 file 졸리운_곰 2021.08.27 3
1038 git 에서 https repository 연결시 SSL 인증서 오류 해결법 file 졸리운_곰 2021.08.27 834
1037 [GIT] Conflict(충돌) 났을 때 강제로 Pull 하기. 졸리운_곰 2021.08.24 8
» [一日30分 인생승리의 학습법] How to Run : Linux Containers on Windows Server 2019 file 졸리운_곰 2021.08.07 10
1035 [一日30分 인생승리의 학습법] [Tensorflow] Serving이용하여 REST API 만들기 file 졸리운_곰 2021.08.07 13
1034 [一日30分 인생승리의 학습법] Amazon SageMaker는 처음이지? 누워서 머신러닝 학습부터 배포까지 file 졸리운_곰 2021.08.05 31
1033 [一日30分 인생승리의 학습법] Apache Beam (Dataflow)를 이용하여, 이미지 파일을 tfrecord로 컨버팅 하기 file 졸리운_곰 2021.08.04 4
1032 [一日30分 인생승리의 학습법] [GCP] Apache Beam 사용하기 file 졸리운_곰 2021.08.04 5
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED