Microsoft MVP성태의 닷넷 이야기
개발 환경 구성: 473. Windows nanoserver에 대한 docker pull의 태그 사용 [링크 복사], [링크+제목 복사],
조회: 11810
글쓴 사람
정성태 (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]

... 46  47  [48]  49  50  51  52  53  54  55  56  57  58  59  60  ...
NoWriterDateCnt.TitleFile(s)
12440정성태12/4/20209075오류 유형: 689. SignTool Error: Invalid option: /as
12439정성태12/4/202010297디버깅 기술: 176. windbg - 특정 Win32 API에서 BP가 안 걸리는 경우 (2) [1]
12438정성태12/2/202010224오류 유형: 688. .Visual C++ - Error C2011 'sockaddr': 'struct' type redefinition
12437정성태12/1/20209915VS.NET IDE: 155. pfx의 암호 키 파일을 Visual Studio 없이 등록하는 방법
12436정성태12/1/202010173오류 유형: 687. .NET Core 2.2 빌드 - error MSB4018: The "RazorTagHelper" task failed unexpectedly.
12435정성태12/1/202015646Windows: 181. 윈도우 환경에서 클라이언트 소켓의 최대 접속 수 (4) - ReuseUnicastPort를 이용한 포트 고갈 문제 해결 [1]파일 다운로드1
12434정성태11/30/202010964Windows: 180. C# - dynamicport 값의 범위를 알아내는 방법
12433정성태11/29/202010002Windows: 179. 윈도우 환경에서 클라이언트 소켓의 최대 접속 수 (3) - SO_PORT_SCALABILITY파일 다운로드1
12432정성태11/29/202011360Windows: 178. 윈도우 환경에서 클라이언트 소켓의 최대 접속 수 (2) - SO_REUSEADDR [1]파일 다운로드1
12431정성태11/27/20209288.NET Framework: 976. UnmanagedCallersOnly + C# 9.0 함수 포인터 사용 시 x86 빌드에서 오동작하는 문제파일 다운로드1
12430정성태11/27/202010025오류 유형: 686. Ubuntu - E: The repository 'cdrom://...' does not have a Release file.
12429정성태11/25/202010125디버깅 기술: 175. windbg - 특정 Win32 API에서 BP가 안 걸리는 경우
12428정성태11/25/20209029VS.NET IDE: 154. Visual Studio - .NET Core App 실행 시 dotnet.exe 실행 화면만 나오는 문제
12427정성태11/24/202010225.NET Framework: 975. .NET Core를 직접 호스팅해 (runtimeconfig.json 없이) EXE만 배포해 실행파일 다운로드1
12426정성태11/24/20208799오류 유형: 685. WinDbg Preview - error InitTypeRead
12425정성태11/24/20209904VC++: 141. Visual C++ - "Treat Warnings As Errors" 옵션이 꺼져 있는데도 일부 경고가 에러 처리되는 경우
12424정성태11/24/202010284VC++: 140. C++의 연산자 동의어(operator synonyms), 대체 토큰 [1]
12423정성태11/22/202011181.NET Framework: 974. C# 9.0 - (16) 제약 조건이 없는 형식 매개변수 주석(Unconstrained type parameter annotations)파일 다운로드1
12422정성태11/21/20208983.NET Framework: 973. .NET 5, .NET Framework에서만 허용하는 UnmanagedCallersOnly 사용예파일 다운로드1
12421정성태11/19/20208751.NET Framework: 972. DNNE가 출력한 NE DLL을 직접 생성하는 방법파일 다운로드1
12420정성태11/19/20207922오류 유형: 684. Visual C++ - MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
12419정성태11/19/20209175VC++: 139. Visual C++ - .NET Core의 nethost.lib와 정적 링크파일 다운로드1
12418정성태11/19/202011231오류 유형: 683. Visual C++ - error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MDd_DynamicDebug'파일 다운로드1
12417정성태11/19/20208622오류 유형: 682. Visual C++ - warning LNK4099: PDB '...pdb' was not found with '...lib(pch.obj)' or at '...pdb'; linking object as if no debug info
12416정성태11/19/20209897오류 유형: 681. Visual C++ - error LNK2001: unresolved external symbol _CrtDbgReport
12415정성태11/18/20209957.NET Framework: 971. UnmanagedCallersOnly 특성과 DNNE 사용파일 다운로드1
... 46  47  [48]  49  50  51  52  53  54  55  56  57  58  59  60  ...