본문 바로가기

원도우

Docker Desktop 설치하기

728x90

Docker Desktop 설치하기

테스트 환경

PS C:\Users\Administrator> systeminfo | findstr /c:"OS Name"
OS Name:                   Microsoft Windows 10 Pro

설치 중 오류 발생

d1

Unpacking failed: 'C:\Program Files\Docker\Docker\Docker Desktop.pdb' 파일은 다른 프로세스에서 사용 중이므로 프로세스에서 액세스할 수 없습니다.
   위치: CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.MoveNext()
--- 예외가 throw된 이전 위치의 스택 추적 끝 ---
   위치: System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   위치: System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   위치: CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()

Docker Desktop 설치하기

d2

 

d3

 

d4

728x90

 

d5

 

  • nginx 컨테이너 실행
docker run -d -p 80:80 nginx
C:\Users\Administrator> docker run -d -p 80:80 nginx
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
3f4ca61aafcd: Pull complete
50c68654b16f: Pull complete
3ed295c083ec: Pull complete
40b838968eea: Pull complete
88d3ab68332d: Pull complete
5f63362a3fa3: Pull complete
Digest: sha256:0047b729188a15da49380d9506d65959cce6d40291ccfb4e039f5dc7efd33286
Status: Downloaded newer image for nginx:latest
c6db78de2bfdfae429151b07c2a347b39f1002819247b914f39760332c513704
  • nginx 컨테이너 프로세스 확인
docker ps -a
C:\Users\Administrator>docker ps -a
CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS         PORTS                NAMES
c6db78de2bfd   nginx     "/docker-entrypoint.…"   2 minutes ago   Up 2 minutes   0.0.0.0:80->80/tcp   blissful_turing
  • nginx 웹 페이지 테스트
curl localhost
C:\Users\Administrator>curl localhost
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>

 

728x90