アプリのレイヤリング

ドッカー

App Layering サービスをインストールするには、アプライアンスをハイパーバイザー上の仮想マシンにデプロイします。

WSL と Docker のインストール方法

これらの手順はすべての App Layering イメージ タイプに適用されますが、主に非永続 VDI デスクトップの完全な UserLayer 展開で使用することを目的としています。 関連するガイダンスについては、 古いバージョンの WSL の手動インストール手順を参照してください。 App Layering の場合、これらの手順では、VM の展開された VDI プール内のドメイン ユーザーのベースとして WSL と Docker が提供されます。

WSL や Docker を使用しようとするドメイン ユーザーは、ドメイン管理者グループのメンバーである必要があります。 これらの手順のユーザー部分で、ドメイン ユーザーに代わって別の管理者アカウントを使用することはできません。

以下では説明されていないその他の前提条件も存在します。たとえば、仮想マシンでネストされた仮想化が有効になっていることを確認すること (WSL2 を使用する予定の場合)、ユーザーがメンバーになる必要がある ‘docker-users’ グループを作成して設定するためのコンピューター GPO が存在することなどです。 Windows 10/11 のバージョンは、使用されている WSL/Docker のバージョンに合わせて最新である必要があります。

ステップバイステップ ガイド - Docker / WSLv2 (Win 10 または 11)

  1. 新しいアプリ レイヤー (推奨) または OS レイヤー リビジョンで、管理者として次の操作を実行します。

    a. dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

    b. dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

    紀元前 WSL自動更新を無効にする

      i.    reg add hklm\software\Microsoft\Windows\CurrentVersion\Lxss /t REG_DWORD /v AutoUpdate /d 0 /f
    

    d. 機能をインストールするには再起動してから再度ログインしてください

    e. Microsoft/WSLから最新の安定した WSL リリースをダウンロードしてインストールします。

      i.    Move the download to a place where users can access it later (do this BEFORE installing it)
       
      ii.    Install of WSL must be done from the same folder location that users will be using
       
          1.  Do not use the wsl --install command
       
          2.  Sample install command: 'msiexec -i wsl.2.3.26.0.x64.msi /L*V wsl-install.log'
       
          3.  Suggestion: create a "UserInstall.cmd" script containing a similar msiexec command to be used in step 2.a
       
      iii.    If an older WSL installation is present it should be uninstalled first (using 'msiexec /x' to fully remove it)
       
      iv.    It is not recommended to install a specific distro into the app layer.   Users can choose a distro later if they wish to.
       
      v.    Do not remove the WSL .msi installer from this folder.   Users will need to apply this exact .msi during their setup later.
    

    f. ‘wsl –version’ を使用して、wsl が動作していることを確認します。

    グラム。 (オプション) .wslconfig を既定のユーザー プロファイルに追加します。

      i.    Existing users would need to copy this to their own profile
       
      ii.    The default network operation for wsl2 should be established in a file named .wslconfig and placed in \Users\Default.
       
          1.  .wslconfig contains two lines: '[wsl2]' and 'networkingMode=mirrored' (without quotes, case as shown)
       
          2.  Only new users-layer users will automatically have this file copied to their profile area
       
          3.  Place a copy of the .wslconfig file in the WSL installer location for existing users to copy
    

    h. Dockerをダウンロードしてインストールする

      i.    See [Install Docker Desktop on Windows](https://docs.docker.com/desktop/install/windows-install/)
       
      ii.    Docker will log out
       
      iii.    Log back in (Docker will start itself, but this can be ignored now)
       
      iv.    'Accept' terms and Close the Docker Desktop sign-in window
       
      v.    In the latest releases of Docker, an error popup may appear at this time (see exact text of this popup in Info section below).   Docker now seems to demand the presence of an installed distro.   This popup can be dismissed and ignored, and Docker will exit due to this.   That too can be ignored at this point in the installation steps. 私。  レイヤーを完成させる (アプリ レイヤーの場合は、イメージに含める必要があり、弾力的に配信されません)
    
  2. ログインするユーザーごとに:

    a. WSLインストーラー(手順1.eiから保存)を見つけて実行します。

      i.    This will be a fast and minimal install that only sets up reparse-points for the user
       
      ii.    This is a one-time install for each user, but can be used again if wsl problems arise
       
      iii.    Do not copy the wsl .msi to an alternate location before installing it (e.g., 'cd \WSL' and repeat the original/similar msiexec command)
    

    b. PowerShell を使用してプライベート ディストリビューションをインストールします (ubuntu-1604 ディストリビューションを使用した例)

      i.    Invoke-WebRequest -Uri [https://aka.ms/wsl-ubuntu-1604](https://aka.ms/wsl-ubuntu-1604) -OutFile ~/Ubuntu.zip -UseBasicParsing
       
      ii.    mkdir ~/distros
       
      iii.    Expand-Archive ~/Ubuntu.zip ~/distros/Ubuntu
       
      iv.    Run the installer as admin ~/distros/Ubuntu/ubuntu*.exe (exact name is version specific)
       
      v.    Provide a username and password you will use to log into wsl, and complete the install
       
      vi.    When this completes, update the distro in the distro-specific fashion ( sudo apt-get update; sudo apt-get upgrade )
       
      vii.    (Optional) create a desktop shortcut to the installed distro's main application
       
      viii.    Leave your distro window running for the remaining steps
    

    紀元前 スタートメニューからDocker Desktopを起動する

      i.    Allow Docker to initialize and start the docker engine
       
      ii.    Important: Docker needs to be made aware of your distro
       
          1.  In Docker, go to 'Setting->Resources→WSL Integration'
       
              a.    Enable the 'additional distro' that matches yours
       
              b.    Disable the 'default WSL distro' selection
       
      iii.    Also, you can control Docker auto-startup in 'Settings→General'
       
      iv.    Remember that your distro/WSL session needs to be started before the Docker engine can start successfully
    

アップグレード

アップグレードされた WSL/Docker App Layering が展開されるたびに、影響を受ける各ユーザーは以前の WSL/Docker レイヤーを使用して修復操作を実行する必要があります。

ドッカー