2016-08-30 9 views
0

Mac의 저장소 드라이버를 devicemapper로 변경하려고합니다. Change docker storage driver on Mac OS X도커 저장 장치 드라이버를 Mac의 devicemapper로 변경하는 방법

의 단계를 따르고 있었지만 다음과 같은 오류가 발생했습니다. Mac 용 도커는 최신 버전입니다.

$ docker-machine create --driver virtualbox --engine-storage-driver devicemapper test2 
Running pre-create checks... 
Creating machine... 
(test2) Copying /Users/weiwang/.docker/machine/cache/boot2docker.iso to /Users/weiwang/.docker/machine/machines/test2/boot2docker.iso... 
(test2) Creating VirtualBox VM... 
(test2) Creating SSH key... 
(test2) Starting the VM... 
(test2) Check network to re-create if needed... 
(test2) Waiting for an IP... 
Waiting for machine to be running, this may take a few minutes... 
Detecting operating system of created instance... 
Waiting for SSH to be available... 
Detecting the provisioner... 
Provisioning with boot2docker... 
Copying certs to the local machine directory... 
Copying certs to the remote machine... 
Setting Docker configuration on the remote daemon... 
Checking connection to Docker... 
Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.105:2376": read tcp 192.168.99.1:49168->192.168.99.105:2376: read: connection reset by peer 
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'. 
Be advised that this will trigger a Docker daemon restart which will stop running containers. 

답변

1

참고 : 더 이상 지원되지 않는 업데이트

Devicemapper을 읽어 보시기 바랍니다. 꽤 좋은 오버레이를 사용할 수 있습니다.

사용법 : docker-machine create --driver virtualbox --engine-storage-driver overlay test2

편집 :

내 첫 댓글이 질문에 제대로 대답하지 않았다. devicemapper 저장 장치 드라이버가 작동하는 방법에 대해 좀 더 조사한 후에 기본 boot2docker 기본 OS 도커 - 머신 사용은 devicemapper 저장 장치 드라이버를 지원하지 않습니다.

  • RHEL/CentOS는/페도라 우분투 12.04
  • 우분투 14.04
  • 데비안

더 자세한 정보는 here를 찾을 수 있습니다

  • :

    여기에 지원되는 배포판의 목록입니다.

    그래서 문제를 해결하려면 언급 된 배포판 중 하나를 VM에 설치해야합니다. tty없이 명령을 실행할 수있는 SSH 서버와 암호가없는 sudo 사용자를 추가하십시오.

    VirtualBox에 CentOS VM을 설치하고 NAT 패키지와 호스트 전용 드라이버 (인터넷 패키지 다운로드 용 NAT, docker-machine 및 VM이 설치된 개인 네트워크 용 호스트 전용 어댑터)를 추가하여이 작업을 시도했습니다.)

    VM을 설정 한 후 다음 명령을 사용하여 해당 컴퓨터를 도커 - 컴퓨터에 연결할 수 있습니다. docker-machine이 VM으로 ssh하고 Docker Engine이 설치되어 있는지 확인합니다. 그렇지 않은 경우 자동으로 다운로드되고 구성됩니다. 여기에 일반 드라이버를 사용하는 방법에 대한

    docker-machine create \ 
        --driver generic \ 
        --generic-ip-address=192.168.58.14 \ 
        --generic-ssh-port 22 \ 
        --generic-ssh-key ~/.ssh/id_rsa \ 
        --engine-storage-driver devicemapper \ 
        docker-centos 
    

    상세 정보 : https://docs.docker.com/machine/drivers/generic/

    희망이는 초기 답 :

  • +0

    감사 Menzo보다 길에 좀 더 당신을 도와, 내가 만들 수 있어요 스토리지 드라이브로 오버레이가있는 컴퓨터이지만 내 문제가 해결되지는 않습니다. 나는 컨테이너 내부에서 서비스를 실행할 필요가 있지만 그 서비스는 파일과 오버레이로 작동하지 않는다. – weiwang

    +0

    @weiwang 나는이 주제에 대한 좀 더 많은 연구를했고 내 대답을 업데이트했다. devicemapper 스토리지 드라이버를 사용할 수는 있습니다. Docker는 기본 기본 OS로 Docker를 지원하지 않습니다. –

    +0

    위대한! 정보 주셔서 감사합니다. – weiwang