heroku / heroku-buildpack-apt

Buildpack that installs APT based dependencies
249 stars 333 forks source link

Aptfile packages "installed" but not installed? #71

Closed gnowland closed 4 years ago

gnowland commented 4 years ago

When I run the build the console shows the package(s) being installed (e.g. nano) but when I docker exec into the container there is no sign of them either with which nano or in the /bin/* directory....

Aptfile file:

nano

.buildpacks file:

https://github.com/heroku/heroku-buildpack-apt.git
https://github.com/heroku/heroku-buildpack-php.git#v180

Build Log:

-----> Cleaning up...
-----> Building new from herokuish...
-----> Adding BUILD_ENV to build environment...
-----> Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
       Detected buildpacks: multi php
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-apt.git
=====> Detected Framework: Apt
-----> Reusing cache
-----> Updating apt caches
       Hit:1 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
       Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
       Get:3 http://archive.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
       Get:4 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
       Fetched 177 kB in 0s (429 kB/s)
       Reading package lists...
-----> Fetching .debs for nano
       Reading package lists...
       Building dependency tree...
       Suggested packages:
       spell
       The following NEW packages will be installed:
       nano
       0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
       Need to get 0 B/231 kB of archives.
       After this operation, 778 kB of additional disk space will be used.
       Download complete and in download only mode
-----> Installing nano_2.9.3-2_amd64.deb
-----> Writing profile script
-----> Rewrite package-config files
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-php.git
=====> Detected Framework: PHP
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:        - php (7.4.10)
remote:        - ext-gd (bundled with php)
remote:        - ext-mbstring (bundled with php)
remote:        - apache (2.4.46)
remote:        - nginx (1.18.0)
remote: -----> Installing dependencies...
remote:        Composer version 1.10.13 2020-09-09 11:46:34
remote:        Loading composer repositories with package information
remote:        Installing dependencies from lock file
remote:        Package operations: 59 installs, 0 updates, 0 removals
remote:          - Installing cweagans/composer-patches (1.6.7): Loading from cache
remote:          - Installing symfony/polyfill-php80 (v1.18.1): Loading from cache
remote:          - Installing symfony/process (v5.1.5): Loading from cache
remote:          - Installing symfony/finder (v5.1.5): Loading from cache
remote:          - Installing symfony/polyfill-ctype (v1.18.1): Loading from cache
remote:          - Installing symfony/filesystem (v5.1.5): Loading from cache
remote:          - Installing symfony/polyfill-mbstring (v1.18.1): Loading from cache
remote:          - Installing symfony/polyfill-intl-normalizer (v1.18.1): Loading from cache
remote:          - Installing symfony/polyfill-intl-grapheme (v1.18.1): Loading from cache
remote:          - Installing symfony/string (v5.1.5): Loading from cache
remote:          - Installing psr/container (1.0.0): Loading from cache
remote:          - Installing symfony/service-contracts (v2.2.0): Loading from cache
remote:          - Installing symfony/polyfill-php73 (v1.18.1): Loading from cache
remote:          - Installing symfony/console (v5.1.5): Loading from cache
remote:          - Installing seld/phar-utils (1.1.1): Loading from cache
remote:          - Installing seld/jsonlint (1.8.2): Loading from cache
remote:          - Installing psr/log (1.1.3): Loading from cache
remote:          - Installing justinrainbow/json-schema (5.2.10): Loading from cache
remote:          - Installing composer/xdebug-handler (1.4.3): Loading from cache
remote:          - Installing composer/spdx-licenses (1.5.4): Loading from cache
remote:          - Installing composer/semver (1.7.0): Loading from cache
remote:          - Installing composer/ca-bundle (1.2.8): Loading from cache
remote:          - Installing composer/composer (1.10.13): Loading from cache
remote:          - Installing gettext/languages (2.6.0): Loading from cache
remote:          - Installing gettext/gettext (v4.8.2): Loading from cache
remote:          - Installing mck89/peast (v1.10.4): Loading from cache
remote:          - Installing mustache/mustache (v2.13.0): Loading from cache
remote:          - Installing nb/oxymel (v0.1.0): Loading from cache
remote:          - Installing rmccue/requests (v1.7.0): Loading from cache
remote:          - Installing wp-cli/mustangostang-spyc (0.6.3): Loading from cache
remote:          - Installing wp-cli/php-cli-tools (v0.11.11): Loading from cache
remote:          - Installing wp-cli/wp-cli (v2.4.1): Loading from cache
remote:          - Installing wp-cli/widget-command (v2.1.1): Loading from cache
remote:          - Installing wp-cli/super-admin-command (v2.0.4): Loading from cache
remote:          - Installing wp-cli/shell-command (v2.0.5): Loading from cache
remote:          - Installing wp-cli/server-command (v2.0.5): Loading from cache
remote:          - Installing wp-cli/search-replace-command (v2.0.7): Loading from cache
remote:          - Installing wp-cli/scaffold-command (v2.0.8): Loading from cache
remote:          - Installing wp-cli/role-command (v2.0.4): Loading from cache
remote:          - Installing wp-cli/rewrite-command (v2.0.5): Loading from cache
remote:          - Installing wp-cli/package-command (v2.0.6): Loading from cache
remote:          - Installing wp-cli/media-command (v2.0.9): Loading from cache
remote:          - Installing wp-cli/maintenance-mode-command (v2.0.3): Loading from cache
remote:          - Installing wp-cli/language-command (v2.0.7): Loading from cache
remote:          - Installing wp-cli/import-command (v2.0.3): Loading from cache
remote:          - Installing wp-cli/i18n-command (v2.2.5): Loading from cache
remote:          - Installing wp-cli/extension-command (v2.0.10): Loading from cache
remote:          - Installing wp-cli/export-command (v2.0.4): Loading from cache
remote:          - Installing wp-cli/eval-command (v2.0.7): Loading from cache
remote:          - Installing wp-cli/entity-command (v2.0.7): Loading from cache
remote:          - Installing wp-cli/embed-command (v2.0.6): Loading from cache
remote:          - Installing wp-cli/db-command (v2.0.6): Loading from cache
remote:          - Installing wp-cli/cron-command (v2.0.5): Loading from cache
remote:          - Installing wp-cli/core-command (v2.0.11): Loading from cache
remote:          - Installing wp-cli/wp-config-transformer (v1.2.7): Loading from cache
remote:          - Installing wp-cli/config-command (v2.0.6): Loading from cache
remote:          - Installing wp-cli/checksum-command (v2.0.4): Loading from cache
remote:          - Installing wp-cli/cache-command (v2.0.4): Loading from cache
remote:          - Installing wp-cli/wp-cli-bundle (v2.4.0): Loading from cache
remote:        Generating optimized autoload files
remote:        Deprecation Notice: Class WP_CLI located in ./vendor/wp-cli/wp-cli/php/class-wp-cli.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///tmp/build/.heroku/php/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
remote:        Deprecation Notice: Class WP_CLI_Command located in ./vendor/wp-cli/wp-cli/php/class-wp-cli-command.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///tmp/build/.heroku/php/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201
remote: -----> Preparing runtime environment...
remote: -----> Checking for additional extensions to install...
       Using release configuration from last framework (PHP).
-----> Discovering process types
       Procfile declares types -> web
-----> Releasing new...
-----> Deploying new...
-----> App Procfile file found
       DOKKU_SCALE declares scale -> web=1
=====> Processing deployment checks
       No CHECKS file found. Simple container checks will be performed.
       For more efficient zero downtime deployments, create a CHECKS file. See http://dokku.viewdocs.io/dokku/deployment/zero-downtime-deploys/ for examples
-----> Attempting pre-flight checks (web.1)
       Waiting for 10 seconds ...
       Default container check successful!
-----> Running post-deploy
-----> Overriding default nginx.conf with detected nginx.conf.sigil
-----> Configuring new.seabirdtracking.org...(using app-supplied template)
-----> Creating https nginx.conf
       Enabling HSTS
       Reloading nginx
-----> Renaming containers
       Found previous container(s) (fcd308bd3b74) named new.web.1

Any idea what's going on?

gnowland commented 4 years ago

@schneems ok I figured out they're installed in /app/.apt/bin/ but $PATH doesn't include this directory, instead it includes /app/.apt/usr/bin which doesn't exist (the only directory within /app/.apt/usr/ is share)... so, how do I add /app/.apt/bin/ to $PATH? It seems like this should be changed in https://github.com/heroku/heroku-buildpack-apt/blob/0357ec1e8863a803ada6c2d57f0850f2c5fa0366/bin/compile#L104 or https://github.com/heroku/heroku-buildpack-apt/blob/0357ec1e8863a803ada6c2d57f0850f2c5fa0366/bin/compile#L113

gnowland commented 4 years ago

Never mind, I figured out I should use https://github.com/dokku-community/dokku-apt because I'm on dokku 🤦‍♀️