diff --git a/CHANGELOG.md b/CHANGELOG.md index cbb526477..76755ec9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ permalink: /docs/en-US/changelog/ * Provisioner/Hook timings now show milliseconds ( #2735 ) * Added a `skip_site_provisioner_update` option to prevent site provisioners being overwritten by updates ( #2733 ) * Only start services that aren't running in post-up scripts ( #2732 ) +* Upgraded Ubuntu from 20.04 to 24.04 for docker provider ( #2739 ) ### Bug Fixes diff --git a/Vagrantfile b/Vagrantfile index 977eddee1..770d23436 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -480,7 +480,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Docker use image. config.vm.provider :docker do |d, override| - d.image = 'pentatonicfunk/vagrant-ubuntu-base-images:20.04' + d.image = 'pentatonicfunk/vagrant-ubuntu-base-images:24.04' d.has_ssh = true d.ports = [ "80:80" ] # HTTP d.ports += [ "443:443" ] # HTTPS diff --git a/config/homebin/vagrant_up b/config/homebin/vagrant_up index 3056d9d23..606291dee 100755 --- a/config/homebin/vagrant_up +++ b/config/homebin/vagrant_up @@ -29,7 +29,7 @@ if [[ -f /srv/config/homebin/vagrant_up_custom ]]; then fi # /etc/host doesn't survive restart on docker -vvv_info " * Updatin Guest VM /etc/hosts" +vvv_info " * Updating Guest VM /etc/hosts" vvv_update_guest_hosts if ! sudo service nginx status > /dev/null; then diff --git a/provision/core/vvv/provision.sh b/provision/core/vvv/provision.sh index b362a41b9..9d3022344 100644 --- a/provision/core/vvv/provision.sh +++ b/provision/core/vvv/provision.sh @@ -96,8 +96,22 @@ function shyaml_setup() { # Used for passing custom parameters to the bash provisioning scripts if [ ! -f /usr/local/bin/shyaml ]; then vvv_info " * Installing Shyaml for bash provisioning.." - sudo pip3 install wheel - sudo pip3 install shyaml + + local OSVERSION_NUMBER + OSVERSION_NUMBER=$(lsb_release -sr) + + # Ubuntu 24 making it hard to install pip packages, throwing externally-managed-environment error + # https://stackoverflow.com/a/75722775 + if dpkg --compare-versions "${OSVERSION_NUMBER[@]}" ge "24.04" + then + # to make it available globally this is the last workaround, hopefully it doesn't break the system + # TODO: try to find a better alternative way to install + sudo pip3 install wheel --break-system-packages + sudo pip3 install shyaml --break-system-packages + else + sudo pip3 install wheel + sudo pip3 install shyaml + fi fi } export -f shyaml_setup