Public | Automated Build

Last pushed: 2 years ago
Short Description
Docker image to run PHP + Apache by Azuki - http://images.azk.io/#/php-apache
Full Description

azukiapp/php-apache

Base docker image to run PHP applications in azk

Versions (tags)

<versions>
- latest, 5, 5.6, 5.6.3
- 5.5, 5.5.9
</versions>

Image content:

PARENT:
  • Ubuntu 14.04
  • Git
  • Vim
  • Node
  • MySQL Client
  • PostgreSQL Client
  • MongoDB
  • Apache2 with root
THIS:
  • PHP Version 5.6/5.5
  • Composer

Usage with azk

Example of using this image with azk:

/**
 * Documentation: http://docs.azk.io/Azkfile.js
 */

// Adds the systems that shape your system
systems({
  "my-app": {
    // Dependent systems
    depends: [], // postgres, mysql, mongodb ...
    // More images:  http://images.azk.io
    image: {"docker": "azukiapp/php-apache"},
    // Steps to execute before running instances
    provision: [
      // "composer install",
    ],
    workdir: "/azk/#{manifest.dir}",
    shell: "/bin/bash",
    command: "# command to run app",
    wait: {"retry": 20, "timeout": 1000},
    mounts: {
      '/azk/#{manifest.dir}': path("."),
    },
    scalable: {"default": 1},
    http: {
      // my-app.dev.azk.io
      domains: [ "#{system.name}.#{azk.default_domain}" ]
    },
    ports: {
      // exports global variables
      http: "80/tcp",
    },
    envs: {
      // set instances variables
      APP_DIR: "/azk/#{manifest.dir}",
    },
  },
});

Usage with docker

To create the image azukiapp/php-apache, execute the following command on the docker-php-apache folder:

$ docker build -t azukiapp/php-apache 5.6/

To run the image and bind to port 80:

$ docker run -it --rm --name my-app -p 80:80 -v "$PWD":/myapp -w /myapp azukiapp/php-apache php index.php

To run the sample project:

Start your image binding external port 80 in all interfaces to your container:

$ docker run -d -p 80:80 azukiapp/php-apache

Test your deployment:

$ curl http://localhost/

Hello world!

Logs

# with azk
$ azk logs my-app

# with docker
$ docker logs <CONTAINER_ID>

License

Azuki Dockerfiles distributed under the Apache License.

Docker Pull Command
Owner
azukiapp
Source Repository

Comments (0)