You can't run apt-get install.
However, you can use any package manager that can be run without sudo/root.
One commonly used example is using brew.sh
- Look up if the package that you need, has a brew package available by entering its name in the search box
- Download the install_brew_packages.sh script from GitHub and put it at the root of your project.
- Edit your build hook and add the package(s) to install as parameters of the script:
Note: some packages may need to be compiled. Brew does this automatically and the script will take care of caching. But the first build will be rather slow. This is normal. Most common packages will be downloaded as binaries, so those will be fast.hooks: build: | set -e bash install_brew_packages.sh duf lnav
- Push the code changes.
https://community.platform.sh/t/can-i-use-homebrew/667