Windows Server 2019에 docker, docker-compose설차하기

Docker CE/Mobyt설치하기

다음 글을 참조하여 설치

Docker파일 디렉토리를 준비합니다.

PS> mkdir c:\work\docker
PS> cd c:\work\docker

PowerShell에서 다음 명령을 실행하여 install-docker-ce.ps1를 다운로드합니다.

PS> Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1

install-docker-ce.ps1파일이 존재하는지 확인합니다.

PS> dir install-docker-ce.ps1
디렉터리: C:\work\docker
Mode            LastWriteTime   Length Name
----            -------------   ------ ----
-a---- 2023-10-08   오후 7:47   21125 install-docker-ce.ps1
PS> .\install-docker-ce.ps1
Querying status of Windows feature: Containers...
Feature Containers is already enabled.
DOCKER default
Checking Docker versions
Downloading https://download.docker.com/win/static/stable/x86_64/docker-24.0.6.zip to C:\Users\Administrator\DockerDownl
oads\docker-24.0.6.zip
Installing Docker... C:\Users\Administrator\DockerDownloads\docker-24.0.6\docker\docker.exe
Installing Docker daemon... C:\Users\Administrator\DockerDownloads\docker-24.0.6\docker\dockerd.exe
Configuring the docker service...
Waiting for Docker daemon...
Successfully connected to Docker Daemon.
The following images are present on this machine:
REPOSITORY   TAG       IMAGE ID   CREATED   SIZE
Script complete!

Docker Compose설치하기

다음 글을 참조하여 설치

위 글에서는 $Env:ProgramFiles\Docker\docker-compose.exe에 설치하지만 여기서는 $Env:windir\System32\docker-compose.exe에 설치하도록 명령을 수정했습니다.

PS> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
PS> Start-BitsTransfer -Source "https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-windows-x86_64.exe" -Destination $Env:windir\System32\docker-compose.exe

다음 명령으로 설치를 확인합니다.

PS> docker-compose.exe version
Docker Compose version v2.20.3

댓글

タイトルとURLをコピーしました