본문 바로가기
K8S/Docker

docker 컨테이너 설정 파일찾기(for windows)

by Rainbound-IT 2022. 11. 14.
반응형

 

docker info 해서 나오는 

Docker Root Dir에 나오는 경로에 있긴한데

윈도우 10 home의 경우 wsl 위에서 도커가 실행이 되다보니 /var/lib/docker 이런 경로로 되어 있다.

(리눅스의 경우는 그냥 /var/lib/docker에 가면 있다.)

 

윈도우에 없는 경로로 설정이 되어 있다.

 

이러면 도커데이터는 wsl 에서 관리하는 vhdx 로 저장이 되는데 이러면 직접적으로 열어보기가 까다롭다.

 

 

 

 

$ docker run -v/:/data -it ubuntu /bin/bash
# chroot /data
# cd /var/lib/docker/containers

컨테이너로 볼륨 마운트 하는 형식으로 접근하는 수밖에 없다.

 

 

이렇게 컨테이너 uid 명으로 폴더가 나오므로 들어가서 설정하면 된다.

 

wslconfig 파일로 설정하면 될것같은데 이미 설치해놓았는데 변경하게 되면 뭔가 이상하게 될것같아서 그냥 이렇게 하는게 마음 편할것 같다.

 

 

 

 

Reference

windows에서 docker 찾기

https://velog.io/@ette9844/Windows10-%EC%97%90%EC%84%9C-varlibdocker-%EC%B0%BE%EA%B8%B0

 

[Docker] Windows10 에서 /var/lib/docker 경로 찾기

docker info 명령을 사용하면 Docker Root Dir 가 표시된다. 해당 경로 하위에 컨테이너/이미지 등이 저장된다.docker infoDocker for Windows 설정화면의 Advanced 탭에서 Disk Image location 을 원하는 경로로

velog.io

 

https://stackoverflow.com/questions/65546108/where-is-hostconfig-json-docker-desktop-wsl2-environment

 

where is hostconfig.json (Docker desktop + WSL2 environment)

As I know, docker doesn't support any command that change port mapping after make container. But this answer said that by changing the hostconfig.json file, I can change port mapping. How do I assi...

stackoverflow.com

 

 

 

 

 

Docker Engine on Windows

https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/configure-docker-daemon

 

Configure Docker in Windows

Table of contents Docker Engine on Windows Article 10/28/2021 5 minutes to read 17 contributors Feedback In this article --> Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016 The Docker Engine and client aren't included with Windows

learn.microsoft.com

 

 

wslconfig 설정

Advanced settings configuration in WSL | Microsoft Learn

 

Advanced settings configuration in WSL

A guide to the wsl.conf and .wslconfig files used for configuring settings when running multiple Linux distributions on Windows Subsystem for Linux.

learn.microsoft.com

https://kdevkr.github.io/limit-resources-docker-desktop-using-wslconfig/

 

도커 데스크탑이 사용하는 WSL 리소스 제한하기

안녕하세요 Mambo 입니다. 오늘은 윈도우 환경의 도커 데스크탑에서 사용하는 WSL 리소스를 제한하는 방법에 대하여 공유하고자 합니다. 윈도우에서 도커 데스크탑을 사용할 때 컴퓨터가 느려진

kdevkr.github.io

 

반응형

댓글