Public | Automated Build

Last pushed: 8 months ago
Short Description
[DEPRECATED - Please use hhvm/hhvm image] HHVM is an open PHP engine built by Facebook.
Full Description

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest file (baptistedonaux/hhvm). This image is updated via pull requests to the baptistedonaux/official-images GitHub repo.

For detailed information about the virtual/transfer sizes and individual layers of each of the above supported tags, please see the hhvm/tag-details.md file in the baptistedonaux/docker-hhvm-doc GitHub repo.

What is HHVM?

HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.

wikipedia.org/wiki/HipHop_Virtual_Machine

How to use this image

Two methods (CLI vs FastCGI):

CLI mode

$ docker run -v /foo.php:/foo.php hhvm foo.php
$ docker run -v /foo.php:/foo.php hhvm hhvm foo.php
$ docker run -v /foo.php:/foo.php hhvm php foo.php

FastCGI mode

$ docker run --name my_container_hhvm hhvm

Complex configuration

Alternatively, a simple Dockerfile can be used to generate a new image that includes the necessary content (which is a much cleaner solution than the bind mount above):

FROM hhvm:latest
RUN …

CMD ["hhvm", "-m", "server", "-vServer.Type=fastcgi", "-vServer.Port=9000", "--debug-sandbox=default"]

How exposing port

$ docker run --name hhvm -d -p 9000:9000 hhvm

If I want use HHVM with Nginx container

Nginx configuration (default.conf)

server {
    listen 80;
    root   /home/docker;

    location ~ \.php$ {
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass hhvm:9000;
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
    }
}

From scratch

$ docker run --name my_hhvm_container -v /path/to/project:/home/docker:rw -d hhvm:latest
$ docker run --name my_nginx_container -v /path/to/default.conf:/etc/nginx/conf.d/default.conf:ro -v /path/to/project:/home/docker:ro --link my_hhvm_container:hhvm -d nginx:latest

... via docker-compose

Example docker-compose.yml for hhvm:

version: '2'

services:
    nginx:
        image: nginx:latest
        volumes:
            - "/path/to/nginx.conf:/etc/nginx/nginx.conf:ro"
            - "/path/to/project:/home/docker:ro"

    hhvm:
        image: hhvm:latest
        volumes:
            - "/path/to/project:/home/docker:rw"
        dns_search:
            - "hhvm"

License

This image is licensed under the MIT License (see LICENSE).

Supported Docker versions

This image supported on Docker version 1.10.0.

User Feedback

Documentation

Documentation for this image is stored in the hhvm/ directory of the baptistedonaux/docker-hhvm-doc GitHub repo. Be sure to familiarize yourself with the repository's README.md file before attempting a pull request.

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

Docker Pull Command
Owner
baptistedonaux
Source Repository