вторник, 23 мая 2017 г.

Docker Toolbox + Windows Subsystem for Linux

Исходные данные:
  1. Microsoft Windows [10.0.15063] (Windows 10 Creators Update);
  2. Docker Toolbox (17.03.1-ce);
  3. VirtualBox [5.1.18 r114002 (Qt5.6.2)] (поставлялся вместе в Docker Toolbox);
  4. Windows Subsystem for Linux (Ubuntu 16.04).
Использовать клиент Docker из WSL (Windows Subsystem for Linux) для работы с сервером Docker в Windows.

  1.  Чтобы успешно работали `volumes`, нужно для каждой виртуальной машины Docker в Windows настроить общие папки для WSL. Например:
    • Путь к папке: `C:\Users`
    • Имя папки: `/mnt/c/Users`
  2. Установить Docker в WSL:
    # Set up the repository
    sudo apt-get -y install \
      apt-transport-https \
      ca-certificates \
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository \
           "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
           $(lsb_release -cs) \
    sudo apt-get update
    # Get Docker CE
    sudo apt-get -y install docker-ce
  3. В WSL направить клиента на сервер Docker в Windows (нужно выполнять каждый раз, когда запускается виртуальная машина (сразу после запуска)):
    # ---- docker_load_env.sh ---- #
    #!/bin/bash # Использование: source docker_load_env.sh [docker_machine_name="docker-default"] docker_machine_name=${1:-"docker-default"} # Все виртуальные машины VirtualBox в Docker требуют TLS export DOCKER_TLS_VERIFY="1" echo "DOCKER_TLS_VERIFY=$DOCKER_TLS_VERIFY" export DOCKER_HOST="$(cmd.exe /C "docker-machine url $docker_machine_name")" echo "DOCKER_HOST=$DOCKER_HOST" export DOCKER_CERT_PATH="$(cmd.exe /C "docker-machine inspect $docker_machine_name --format="{{.HostOptions.AuthOptions.CertDir}}"" | sed -e 's/\\/\//g' -e 's/\([A-Z]\):/\/mnt\/\L\1/')" echo "DOCKER_CERT_PATH=$DOCKER_CERT_PATH"
  4. Готово

3 комментария:

  1. Mango Habanero Recipe | Glaze and Spice
    Mango Habanero Recipe bet365 Mango starvegad Habanero Recipe. Glaze and Spice. 8.50 oz. $12.99. Add to Cart. Add to Bag. 샌즈카지노 Total Size. 1.35 lbs $10.95 · ‎In stock

  2. Jammin' Jars Casino Review - JTHub
    Jammin Jars Casino is one of the finest casino games 경상남도 출장마사지 in the world. 원주 출장안마 The site was founded in 여주 출장샵 2012 and has 익산 출장마사지 created a variety of exciting games. 아산 출장안마

  3. You can both ship them an email or get in 1xbet korea contact by way of the reside chat. The average ready time for an agent to reply is quantity of} seconds, which is considered a fantastic advantage. The app supplies you with access to slots, desk video games, progressives corresponding to Tomb Raider, Avalon, Mermaids Millions, Thunderstruck. Yes, JackpotCity Casino pays withdrawals to verified prospects without any problem. Keep in mind that you can solely deposit from the actual cash stability, and you may't cash out bonuses right away. There additionally be|can be} a free-to-play possibility for most video games, however that is for attempting issues out in demo mode.