All Projects → petronetto → php7-alpine

petronetto / php7-alpine

Licence: BSD-3-Clause License
Docker container for PHP 7 in Alpine Linux, with almost all extensions that you may need

Programming Languages

Dockerfile
14818 projects
PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to php7-alpine

docker-laravel-appengine
Laravel dockerized with official Google App Engine flexible php environment + swoole.
Stars: ✭ 66 (+230%)
Mutual labels:  alpine, swoole
docker-nfs4
Simple containerized NFS v4 server running on Alpine Linux
Stars: ✭ 19 (-5%)
Mutual labels:  alpine, container
Docker Alpine Java
Oracle Java8 over AlpineLinux with glibc 2.29
Stars: ✭ 703 (+3415%)
Mutual labels:  alpine, container
Alphp
A micro PHP Docker environment based on an Alpine image. Can be used for container publishing, the completed image is only 30-40M
Stars: ✭ 100 (+400%)
Mutual labels:  alpine, swoole
docker-mongodb-backup
Docker MongoDB Backup Container based on Alpine w/S6 init, Zabbix Monitoring
Stars: ✭ 27 (+35%)
Mutual labels:  mongo, alpine
Laravel Swoole
High performance HTTP server based on Swoole. Speed up your Laravel or Lumen applications.
Stars: ✭ 3,726 (+18530%)
Mutual labels:  lumen, swoole
docker-swoole-webapp
Simple Docker-image to build your applications based on Async PHP extensions.
Stars: ✭ 26 (+30%)
Mutual labels:  alpine, swoole
Laravel S
LaravelS is an out-of-the-box adapter between Swoole and Laravel/Lumen.
Stars: ✭ 3,479 (+17295%)
Mutual labels:  lumen, swoole
lumen-newrelic
New Relic instrumentation for the Lumen framework
Stars: ✭ 26 (+30%)
Mutual labels:  lumen, newrelic
static-php-cli
Build single static PHP binary in linux, build with PHP project together, with Swoole and other popular extensions included.
Stars: ✭ 129 (+545%)
Mutual labels:  alpine, swoole
docker-php7
A docker image with php 7 and extensions (apc, apcu, intl, mcrypt,...)
Stars: ✭ 16 (-20%)
Mutual labels:  alpine, xdebug
docker-jre
Lean JRE 8 Docker container
Stars: ✭ 25 (+25%)
Mutual labels:  alpine, container
homebrew-extensions
🍻 Homebrew tap for PHP extensions
Stars: ✭ 264 (+1220%)
Mutual labels:  xdebug, swoole
docker-compose-moodle
This project quickly builds a local workspace for Moodle (Apache2, PHP-FPM with XDEBUG y Postgres) using containers for each of its main components. The local workspace is built and managed by Docker Compose
Stars: ✭ 33 (+65%)
Mutual labels:  xdebug, container
mongodb-info
MongoDB Info - command line tool to get stats.
Stars: ✭ 13 (-35%)
Mutual labels:  mongo
php-xdebug-proxy
PHP xdebug (dbgp) proxy server
Stars: ✭ 71 (+255%)
Mutual labels:  xdebug
wordpress-php
PHP docker container image for WordPress
Stars: ✭ 24 (+20%)
Mutual labels:  alpine
docker-mysql-cron-backup
Docker image to backup all your databases periodically
Stars: ✭ 144 (+620%)
Mutual labels:  alpine
lumen-api-skeleton
Lumen API skeleton with JWT to manager tokens, Socialite to OAuth Providers, MongoDB driver and Predis to Redis cache storage.
Stars: ✭ 22 (+10%)
Mutual labels:  lumen
gene
Grace, fastest, flexibility, simple PHP extension framework!优雅、极速、灵活、简单的PHP扩展框架!
Stars: ✭ 30 (+50%)
Mutual labels:  swoole

PHP7 Alpine

nodesource/node

PHP7 with almost everything that you may need.

CircleCI

Buy Me a Coffee at ko-fi.com

Running

Run docker-composer -up and access http://localhost:8080 (NGINX) or http://localhost:8000 (Caddy).

NOTE: The container will run with user www-data, that is a non-root user, if you need access the container as root run docker exec -u 0 -it php-fpm sh.

New Relic

To enable New Relic Agent, you must pass set the env NEWRELIC_ENABLED and NEWRELIC_LICENSE. Other params is also available, check the Dockerfile for more details.

Remote debug

The container is configured to run the file that bootstrap applications in folder /app/public, because I use Laravel/Lumen by default, so, if you don't use a framework that bootstrap the application in this folder, you must put your source files there. To the debug works, you must:

  1. Set your local IP address in XDEBUG_HOST environment variable in docker-compose.yml.

  2. Configure your editor/IDE to map the local source and the remote source.

IDE/Editor configuration

You need configure your editor/IDE to map the local source and where is the remote source.

VS Code

Install PHP Debug Extension.

Put this config in your launch.json:

NOTE this example will map the local folder app, to /app on the container. Remenber that container is configured to boostrap in /app/public, as the example provided in this repo

//launch.json
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000,
            "pathMappings": {
                "/app": "${workspaceRoot}"
            },
            "ignore": ["**/vendor/**/*.php"]
        }
    ]
}

Sublime Text

Install XDebug Client

Create a sublime-project in Project > Save Project As...

Paste the config as bellow in created file, and ensure that path_mapping is mapping the full path to your source, eg: C:\my\source, /Users/user/my/source, /home/user/source, etc...:

{
  "folders": [
    {
      "follow_symlinks": true,
      "path": "."
    }
  ],
  "settings": {
    "xdebug": {
      "url": "http://localhost:8080",
      "path_mapping": {
        "/app" : "/full/path/to/your/source"
      }
    }
  }
}

Atom

Intall this extension, go to Settings > Open Config Folder and put in your config.cson:

"php-debug":
    PathMaps: [
      "remotepath;localpath"
      "/app;/path/to/your/local/source"
    ]

PHPStorm

Configuration is in two parts:

Configuring a Server: Preferences > Languages & Frameworks > PHP > Servers

Configuring a new PHP Remote Debugger: Run > Edit Configurations click in + and PHP Remote Debugger

License BSD 3-Clause

BSD 3-Clause License

Copyright (c) 2017, Juliano Petronetto
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].