docker가 wsl2 에서의 가동을 지원하면서 윈도우에서 초기 세팅이 어지러워짐
wsl2 - 리눅스 시스템을 윈도우 상에서 사용할 수 있게 해주는 서비스인데, 비교적 최근에 업데이트됨,
1에서는 리눅스 환경을 구현해주는 서포트 프로그램을 사용했는데 2에서는 리눅스 커널을 윈도우 상에서 지원
1. wsl2 최신 패키지를 설치
아래 두 명령어 실행
$ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
//"Linux용 Windows 하위 시스템" 옵션 기능을 사용하도록 설정 - Windows에서 Linux 배포를 위함
$ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
// Virtual Machine 플랫폼 옵션 기능을 사용하도록 설정 - wsl2 설치를 위함
윈도우 재부팅 후
x64 머신용 최신 WSL2 Linux 커널 업데이트 패키지를 다운로드 받아 설치
새 Linux 배포를 설치할 때 WSL 2를 기본 버전으로 설정
wsl --set-default-version 2
2. Docker for window 설치
https://www.docker.com/products/docker-desktop/
3. Docker 실행 후 wsl2 위에서 가동 확인
$ wsl -l -v
NAME STATE VERSION
* docker-desktop Running 2
docker-desktop-data Running 2
$ docker version
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
...
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
추가적으로,
무한 로딩 에러 발생시!!
도커 데몬이 윈도우 버젼으로 실행되고 있지 않기 때문이다. - (도커 데몬이란? https://hanseom.tistory.com/250)
도커 프로그램 파일에서 cli로 swichDaemon이란 명령어 실행하기
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
에러(docker error) in the default daemon configuration on windows the docker client must be run elevated to connect 발생시!!
Expose deamon on tcp://localhost:2375 without TLS 옵션키기
(아래 Use the WSL 2 based engine 은 wsl2를 사용하기 때문에 켜져있어야 한다.)
'develop' 카테고리의 다른 글
이미지 생성 서버 배포해보기 (feat. Stable diffusion, Bentoml, S3) (0) | 2023.12.08 |
---|---|
RDS 비용 모음 (청구 요금) (0) | 2022.11.25 |
전자서명과 디지털 서명 (0) | 2022.11.20 |
TF-IDF, 코사인 유사도 (0) | 2022.05.10 |