Docker image to run PHP + Apache by Azuki - http://images.azk.io/#/php-apache
3.7K
Base docker image to run PHP applications in azk
azkExample 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}",
},
},
});
dockerTo 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
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!
# with azk
$ azk logs my-app
# with docker
$ docker logs <CONTAINER_ID>
Azuki Dockerfiles distributed under the Apache License.
Content type
Image
Digest
sha256:00964e519…
Size
310.9 MB
Last updated
over 10 years ago
docker pull azukiapp/php-apache