Add php container

Signed-off-by: Liu Jianjun <jianjun.liu@intel.com>
This commit is contained in:
Liu Jianjun
2019-05-01 11:52:25 -07:00
committed by George T Kramer
parent 0ade629569
commit 245e07782c
4 changed files with 55 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ env:
- DOCKERFILE_DIR=memcached
- DOCKERFILE_DIR=mixer-ci
- DOCKERFILE_DIR=nginx
- DOCKERFILE_DIR=php
- DOCKERFILE_DIR=postgres
- DOCKERFILE_DIR=python
- DOCKERFILE_DIR=redis
+10
View File
@@ -0,0 +1,10 @@
FROM clearlinux:latest
MAINTAINER jianjun.liu@intel.com
ARG swupd_args
RUN swupd update $swupd_args \
&& swupd bundle-add php-basic $swupd_args \
&& rm -rf /var/lib/swupd/*
CMD ["php","-a"]
+43
View File
@@ -0,0 +1,43 @@
php
==========
This provides a Clear Linux* php basic cli instance.
Build
-----
```
docker build -t clearlinux/php .
```
Or just pull it from Dockerhub
---------------------------
```
docker pull clearlinux/php
```
start a php instance
-----------------------
```
docker run --name some-php clearlinux/php
```
Run my own php instance
-----------------------
Create a Dockerfile in your own php project
```
FROM clearlinux/php:latest
COPY . /usr/src/myphpapp
WORKDIR /usr/src/myphpapp
CMD [ "php", "./my-script.php" ]
```
Then, run the commands to build and run the Docker image:
```
$ docker build -t my-own-php-instance .
$ docker run -it --rm --name my-running-php my-own-php-instance
```
Extra Build ARGs
----------------
- ``swupd_args`` Specifies [SWUPD](https://clearlinux.org/documentation/swupdate_how_to_run_the_updater.html) flags
Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg
+1
View File
@@ -0,0 +1 @@
<?php print "Hello World!\n"; ?>