In order to support the underlying Ubuntu install for WSL, the following strategies have been established for maintaining the underlying software in a disconnected environment. This required software can be retrieved and installed via the Build-LinuxCache.ps1 script.
Open WSL and change to the bundle/linux
cache directory.
sudo apt dpkg -i ./apt-cache/*.deb
You can verify the installation by checking for the presence of the commands generated by the installations:
commands="apt-offline node npm git az jq uuidgen"
echo "$(comamnd -v ${commands})"
# sample output:
# /usr/bin/apt-offline
# /usr/bin/node
# /mnt/c/Program Files/nodejs/npm
# /usr/bin/git
# /usr/bin/az
# /usr/bin/jq
# /usr/bin/uuidgen
Open WSL and change to the bundle/linux/dotnet/
cache directory.
# replace <version> and <arch> with the proper values
DOTNET_FILE=dotnet-sdk-<version>-linux-<arch>.tar.gz
export DOTNET_ROOT=~/.dotnet/
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools
You can verify the installation with dotnet --list-sdks
.
To update and upgrade the underlying system, the apt-offline apt package is used. You must be sure it is installed by following the Install Apt Software steps above.
First, a signature file (offline.sig
) containing the update / upgrade information needs to be generated on the offline system:
sudo apt-offline set ./offline.sig --update --upgrade
Transfer the offline.sig
file to an internet-facing workstation and execute:
This step took an unreasonably long amount of time to complete. Looking into writing a script that iterates through the
.sig
file to download the updates vs. usingapt-offline
in WSL. See apt-offline: Script Package Downloads from Generated .sig Files.
sudo apt-offline get -d ./update ./offline-sig
Once complete, transfer the generated update
directory to the offline system and execute:
sudo apt-offline install ./update