Heroku Container Registry ready minimal image of Nginx + PHP-FPM on Alpine.
2.7K
Minimal image of Nginx + PHP-FPM running on Alpine.
With this image š you can deploy your PHP project to Heroku via Container Registryā š because layer count and image size are decreased as much as possible to meet Heroku's restrictionā .
This is just an example. It's of course ready for Composer.
$ cd /path/to/your-php-project
$ tree .
.
āāā index.php
āāā Dockerfile
0 directories, 3 files
<?php
// index.php
echo 'Hello, Heroku Container Registry!';
# Dockerfile
FROM ttskch/nginx-php-fpm-heroku
# as will be described later, just for local development
USER nonroot
$ heroku login
$ heroku container:login
$ heroku create {appname}
$ heroku container:push web
$ heroku open
Then you can see 'Hello, Heroku Container Registry!' on https://{appname}.herokuapp.com
Of course you can run your app locally on this image too.
$ docker build . -t {sometag}
$ docker run -p {port}:8888 -v $(pwd):/docroot {sometag}
Or
$ heroku container:push web
$ docker run -p {port}:8888 -v $(pwd):/docroot registry.heroku.com/{appname}/web
Then browse http://localhost:{port}ā
See examplesā .
Feel free to send Pull Request for
Content type
Image
Digest
Size
35.5 MB
Last updated
over 8 years ago
docker pull ttskch/nginx-php-fpm-heroku