Base docker image to run PHP applications in azk
- Ubuntu 14.04
- Git
- VIM
- Composer
- NodeJS
- npm
- PHP
Database:
- PostgreSQL client
- MySQL client
- MongoDB
- SQLite3
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-fpm"},
// Steps to execute before running instances
provision: [
// "composer install",
],
workdir: "/azk/#{manifest.dir}",
shell: "/bin/bash",
wait: {"retry": 20, "timeout": 1000},
mounts: {
'/azk/#{manifest.dir}': sync("."),
},
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}",
},
},
});
To create the image azukiapp/php-fpm
, execute the following command on the docker-php-fpm folder:
$ docker build -t azukiapp/php-fpm 5.6/
To run the image and bind to port 80:
$ docker run -d --rm --name my-app -p 80:80 -v "$PWD":/var/www -w /var/www azukiapp/php-fpm
Start your image binding external port 80 in all interfaces to your container:
$ docker run -d -p 80:80 azukiapp/php-fpm
Test your deployment:
$ curl http://localhost/
Hello world!
# with azk
$ azk logs my-app
# with docker
$ docker logs <CONTAINER_ID>
Azuki Dockerfiles distributed under the Apache License.