성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Get Started with Milvus Vector DB i...
[정성태] cyberark/PipeViewer - A tool that...
[정성태] WinForms in a 64-Bit world – our st...
[정성태] 예제에서 SELECT_SQL도 내부적으로는 SqlCommand/...
[victor] SELECT_LINQ SELECT_SQL 같은 쿼리인...
[victor] 답변 갑사합니다. 예외(Exception)가 났습니다. ...
[정성태] 일단, 위의 방식대로 하면 예외(Exception) 없이 잘 동...
[정성태] Windows 10 (버전 1809)에 이런 기능이 ^^ 추가되...
[정성태] pde windbg extension ; https://lea...
[정성태] // GetEnumerator extensions for Ran...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>"Docker Desktop for Windows"의 "Linux Container" 모드를 위한 tcp 바인딩 추가</h1> <p> 지난 글에서 설명한 대로,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 윈도우 환경에서의 dockerd.exe("Docker Engine" 서비스)가 Linux의 것과 다른 점 ; <a target='tab' href='https://www.sysnet.pe.kr/2/0/12168'>https://www.sysnet.pe.kr/2/0/12168</a> </pre> <br /> daemon.json에서의 tcp 바인딩 설정은 "Linux Container" 모드인 경우 예외를 발생하게 됩니다. 대신, 이에 대한 우회 방법은 제공하는데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Cannot set hosts in daemon configuration ; <a target='tab' href='https://github.com/docker/for-win/issues/453'>https://github.com/docker/for-win/issues/453</a> For unsecured connection: <a target='tab' href='https://hub.docker.com/r/jarkt/docker-remote-api'>https://hub.docker.com/r/jarkt/docker-remote-api</a> For TLS connection: <a target='tab' href='https://hub.docker.com/r/kekru/docker-remote-api-tls'>https://hub.docker.com/r/kekru/docker-remote-api-tls</a> </pre> <br /> 이 방법도 "<a target='tab' href='https://www.sysnet.pe.kr/2/0/12174'>DockerDesktopVM의 파일 시스템 접근</a>"에서와 같이 docker스러운 방법으로 해결하고 있어, 그냥 다음과 같이 docker-remote-api 컨테이너를 구동하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\temp> <span style='color: blue; font-weight: bold'>docker pull jarkt/docker-remote-api</span> c:\temp> <span style='color: blue; font-weight: bold'>docker run -p 2375:2375 -v /var/run/docker.sock:/var/run/docker.sock jarkt/docker-remote-api</span> </pre> <br /> "Docker Desktop for Windows"는 "-p" 옵션의 매핑 포트를 (실제 dockerd가 실행되는) "DockerDesktopVM" 가상 머신 내부가 아닌, DockerDesktopVM을 호스팅하는 윈도우 시스템의 "com.docker.backend.exe"가 열고 중계를 합니다. 따라서, 2375 포트와 현재의 윈도우 머신 IP를 대상으로 원격 docker.exe 클라이언트에서 다음과 같이 명령어를 수행하면, 결국 DockerDesktopVM 내부의 dockerd 프로세스로 중계되는 요청을 할 수 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > // 원격 머신에서 docker-remote-api 컨테이너를 수행 중인 192.168.100.50 호스트로 tcp 바인딩 C:\temp> <span style='color: blue; font-weight: bold'>docker -H tcp://192.168.100.50:2375 images</span> REPOSITORY TAG IMAGE ID CREATED SIZE jarkt/docker-remote-api latest abd8bbdf149a 2 years ago 8.24MB </pre> <br /> 참고로 다음은 "docker info" 결과입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp> <span style='color: blue; font-weight: bold'>docker -H 192.168.100.50:2375 info</span> Client: Debug Mode: false Server: Containers: 1 Running: 1 Paused: 0 Stopped: 0 Images: 6 Server Version: 19.03.5 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657 init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 4.19.76-linuxkit Operating System: Docker Desktop <span style='color: blue; font-weight: bold'>OSType: linux</span> Architecture: x86_64 CPUs: 2 Total Memory: 1.92GiB Name: docker-desktop ID: Q46Z:POTP:4MRH:XJIT:XBI7:HXTU:V33Y:UFLC:3Z77:QQNV:IZ2U:ZA6V Docker Root Dir: /var/lib/docker Debug Mode: true File Descriptors: 44 Goroutines: 59 System Time: 2020-03-07T16:58:07.835887458Z EventsListeners: 4 Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false Product License: Community Engine </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
3267
(왼쪽의 숫자를 입력해야 합니다.)