Use ISO as Apt Repository

1
2
3
4
5
6
7
8
9
ISO_PATH="~/ubuntu_18_04.iso"
UBUNTU_CODE="bionic"

sudo mkdir /media/apt
sudo mount ${ISO_PATH} /media/apt -o loop
sudo echo "deb file:/media/apt/ ${UBUNTU_CODE} main contrib" >> /etc/apt/sources.list

sudo apt-get -o Acquire::AllowInsecureRepositories=true update
# sudo apt-get -o Acquire::AllowInsecureRepositories=true install bcmwl-kernel-source

Reference

How to use a .iso image as a CD-ROM Repository?
How do I bypass/ignore the gpg signature checks of apt?