Skip to content

Support launching docker run ... bash when used without the procfile #184

@schneems

Description

@schneems

When you run docker run ... bash the value passed in is treated as an argument for the default command.

By default the PHP buildpack sets the web process type to a direct command:

$ pack inspect my-image-name-php-main
...
Buildpacks:
  ID                VERSION        HOMEPAGE
  heroku/php        0.2.4          https://github.com/heroku/buildpacks-php

Processes:
  TYPE                 SHELL        COMMAND                   ARGS        WORK DIR
  web (default)                     heroku-php-apache2                    /workspace

So when you run docker run ... bash it tries to run heroku-php-apache2 bash.

The short term workaround is to provide an entrypoint like:

$ docker run -it --rm --entrypoint='/cnb/lifecycle/launcher' my-image-name-php-main bash

The long term fix is to use bash -c for all commands like heroku/buildpacks-ruby#404

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions