Microsoft MVP성태의 닷넷 이야기
개발 환경 구성: 473. Windows nanoserver에 대한 docker pull의 태그 사용 [링크 복사], [링크+제목 복사],
조회: 11722
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

Windows nanoserver에 대한 docker pull의 태그 사용

"nanoserver" 이미지를 받아볼까요? ^^

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver
Using default tag: latest
Error response from daemon: manifest for mcr.microsoft.com/windows/nanoserver:latest not found: manifest unknown: manifest unknown

위와 같이 기본적으로 tag를 안 붙이는 경우 ":latest"로 접근하게 되는데 "모든" 이미지들이 꼭 "latest"가 붙은 이미지를 함께 배포하는 것은 아니므로 해당 이미지 배포본의,

Nano Server
; https://hub.docker.com/_/microsoft-windows-nanoserver

도움말을 찾아 지원되는 태그를 확인하는 것이 좋습니다.

Note: This repo does not publish or maintain a latest tag. Please declare a specific tag when pulling or referencing images from this repo.

참고로, 위의 링크에도 나오지만 nanoserver의 지원되는 모든 태그 목록은 다음과 같은 링크로 구할 수 있습니다.

List of all available tags for windows/nanoserver 
; https://mcr.microsoft.com/v2/windows/nanoserver/tags/list




그런데 지원된다고 하는 태그조차도 manifest 목록에 없다고 할 수 있습니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:1903
1903: Pulling from windows/nanoserver
no matching manifest for windows/amd64 10.0.14393 in the manifest list entries

그래서 "List of all available tags for windows/nanoserver" 목록을 통해 근사치 태그로 접근해도 이번에는 현재 운영체제와 맞지 않는 이미지라고 오류가 발생할 수 있습니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:1903-amd64
1903-amd64: Pulling from windows/nanoserver
a Windows version 10.0.18362-based image is incompatible with a 10.0.17763 host

"docker info" 명령어로 확인해 보면,

Kernel Version: 10.0 17763 (17763.1.amd64fre.rs5_release.180914-1434)
Operating System: Windows Server 2019 Datacenter Version 1809 (OS Build 17763.1075)
OSType: windows
Architecture: x86_64
CPUs: 8

운영체제의 버전이 1809이므로 "1903-amd64"의 경우 그보다 최신 버전이므로 오류가 발생한 것입니다. 따라서, 태그 목록에서 1809 관련한 태그를 찾아 시도하면,

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:1809-amd64
1809-amd64: Pulling from windows/nanoserver
a35da61c3562: Pull complete
Digest: sha256:06281772b6a561411d4b338820d94ab1028fdeb076c85350bbc01e80c4bfa2b4
Status: Downloaded newer image for mcr.microsoft.com/windows/nanoserver:1809-amd64

휴~~~ 이제야 겨우 이미지를 내려받았습니다. ^^; 하지만, 만약 여러분이 운이 나빠 "Docker Desktop for Windows" 환경에서 테스트하는 경우라면 이런 오류도 만날 수 있습니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:1809-amd64
1809-amd64: Pulling from windows/nanoserver
a35da61c3562: Downloading [==>                                                ]  5.405MB/101.1MB
image operating system "windows" cannot be used on this platform

그렇습니다, 현재 "Docker Desktop"이 "Linux Containers" 모드로 동작하고 있기 때문에 윈도우 이미지를 설치할 수 없는 것입니다. 트레이 아이콘으로 가서 "Switch to Windows containers..." 명령을 실행한 후에야 "nanoserver" 이미지를 설치할 수 있습니다.




만약 여러분들이 운이 나빠 "Windows Server 2016"을 가지고 있다면,

C:\temp> docker info
...[생략]... 
 Kernel Version: 10.0 14393 (14393.3541.amd64fre.rs1_release_inmarket.200218-2047)
 Operating System: Windows Server 2016 Standard Version 1607 (OS Build 14393.3542)
 OSType: windows
...[생략]...

"Version 1607"을 보고는 아마도 다음과 같이 시도할지도 모르겠습니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:1607-amd64
Error response from daemon: manifest for mcr.microsoft.com/windows/nanoserver:1607-amd64 not found: manifest unknown: manifest unknown

아쉽게도 마이크로소프트는 1607-amd64 태그를 가진 nanoserver는 배포하지 않습니다. 대신 "1803-amd64"를 실행해 보면, 당연히 현재의 운영체제에서는 지원할 수 없다는 오류 메시지를 보게 됩니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:1803-amd64
1803-amd64: Pulling from windows/nanoserver
a Windows version 10.0.17134-based image is incompatible with a 10.0.14393 host

Windows Server 2016의 경우에는, "OS Build" 버전의 정보까지 내려가서 태그를 달아야 합니다. 위에서 docker info로 본 OS Build는 14393.3542였는데, 그렇다고 해서 이 빌드 버전을 그대로 사용할 수는 없습니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:10.0.14393.3542
Error response from daemon: manifest for mcr.microsoft.com/windows/nanoserver:10.0.14393.3542 not found: manifest unknown: manifest unknown

"List of all available tags for windows/nanoserver" 목록을 보고, 최대한 근사치의 태그를 찾아 시도해 보면 정상적으로 이미지를 다운로드할 수 있습니다.

C:\temp> docker pull mcr.microsoft.com/windows/nanoserver:10.0.14393.2430
10.0.14393.2430: Pulling from windows/nanoserver
bce2fbc256ea: Already exists
4a14bdf6da80: Pull complete
Digest: sha256:ba322999264cd8ecdfb3fcaec020c7a479ff63e6c4333d89d11d67ecbd96b2b3
Status: Downloaded newer image for mcr.microsoft.com/windows/nanoserver:10.0.14393.2430
mcr.microsoft.com/windows/nanoserver:10.0.14393.2430




결국, 여러분들이 nanoserver를 기반으로 한 Dockerfile을 만들 때 사용할 기반 이미지의 태그를,

FROM mcr.microsoft.com/windows/nanoserver:1809
...

주의 깊게 사용해야 합니다. 개발자의 환경에서는 Windows 10을 사용해 1903 nanoserver로 무심코 이미지를 생성할 수 있겠지만, 그것이 실 서버에 올라갈 때는 운영팀에서 (역시 무심코) 올리게 될 환경이 Windows Server 2019 서버일지라도 1809 버전 또는 1903 버전일 수 있으므로 그에 따라 혼란을 야기할 수 있습니다.




참고로 이와 관련한 공식 문서도 보시고. ^^

Windows container version compatibility
; https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-1909%2Cwindows-10-1909




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 3/9/2024]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2020-09-27 07시04분
[happyrami] 큰 도움이 되었습니다. 감사합니다. ^^
[guest]

... 31  32  33  34  35  36  [37]  38  39  40  41  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
12711정성태7/15/20218531개발 환경 구성: 578. Azure - Java Web App Service를 위한 Site Extension 제작 방법
12710정성태7/15/202110330개발 환경 구성: 577. MQTT - emqx.io 서비스 소개
12709정성태7/14/20216915Linux: 42. 실행 중인 docker 컨테이너에 대한 구동 시점의 docker run 명령어를 확인하는 방법
12708정성태7/14/202110326Linux: 41. 리눅스 환경에서 디스크 용량 부족 시 원인 분석 방법
12707정성태7/14/202177589오류 유형: 734. MySQL - Authentication method 'caching_sha2_password' not supported by any of the available plugins.
12706정성태7/14/20218750.NET Framework: 1076. C# - AsyncLocal 기능을 CallContext만으로 구현하는 방법 [2]파일 다운로드1
12705정성태7/13/20218925VS.NET IDE: 168. x64 DLL 프로젝트의 컨트롤이 Visual Studio의 Designer에서 보이지 않는 문제 - 두 번째 이야기
12704정성태7/12/20218063개발 환경 구성: 576. Azure VM의 서비스를 Azure Web App Service에서만 접근하도록 NSG 설정을 제한하는 방법
12703정성태7/11/202113708개발 환경 구성: 575. Azure VM에 (ICMP) ping을 허용하는 방법
12702정성태7/11/20218857오류 유형: 733. TaskScheduler에 등록된 wacs.exe의 Let's Encrypt 인증서 업데이트 문제
12701정성태7/9/20218492.NET Framework: 1075. C# - ThreadPool의 스레드는 반환 시 ThreadStatic과 AsyncLocal 값이 초기화 될까요?파일 다운로드1
12700정성태7/8/20218883.NET Framework: 1074. RuntimeType의 메모리 누수? [1]
12699정성태7/8/20217690VS.NET IDE: 167. Visual Studio 디버깅 중 GC Heap 상태를 보여주는 "Show Diagnostic Tools" 메뉴 사용법
12698정성태7/7/202111654오류 유형: 732. Windows 11 업데이트 시 3% 또는 0%에서 다운로드가 멈춘 경우
12697정성태7/7/20217547개발 환경 구성: 574. Windows 11 (Insider Preview) 설치하는 방법
12696정성태7/6/20218146VC++: 146. 운영체제의 스레드 문맥 교환(Context Switch)을 유사하게 구현하는 방법파일 다운로드2
12695정성태7/3/20218179VC++: 145. C 언어의 setjmp/longjmp 기능을 Thread Context를 이용해 유사하게 구현하는 방법파일 다운로드1
12694정성태7/2/202110141Java: 24. Azure - Spring Boot 앱을 Java SE(Embedded Web Server)로 호스팅 시 로그 파일 남기는 방법 [1]
12693정성태6/30/20217883오류 유형: 731. Azure Web App Site Extension - Failed to install web app extension [...]. {1}
12692정성태6/30/20217768디버깅 기술: 180. Azure - Web App의 비정상 종료 시 남겨지는 로그 확인
12691정성태6/30/20218599개발 환경 구성: 573. 테스트 용도이지만 테스트에 적합하지 않은 Azure D1 공유(shared) 요금제
12690정성태6/28/20219415Java: 23. Azure - 자바(Java)로 만드는 Web App Service - Tomcat 호스팅
12689정성태6/25/20219980오류 유형: 730. Windows Forms 디자이너 - The class Form1 can be designed, but is not the first class in the file. [1]
12688정성태6/24/20219654.NET Framework: 1073. C# - JSON 역/직렬화 시 리플렉션 손실을 없애는 JsonSrcGen [2]파일 다운로드1
12687정성태6/22/20217613오류 유형: 729. Invalid data: Invalid artifact, java se app service only supports .jar artifact
12686정성태6/21/202110066Java: 22. Azure - 자바(Java)로 만드는 Web App Service - Java SE (Embedded Web Server) 호스팅
... 31  32  33  34  35  36  [37]  38  39  40  41  42  43  44  45  ...