Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve build and docs #24

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ TAG?=latest
default: nginx ppm standalone

nginx:
docker build -t phppm/nginx:${TAG} -f build/Dockerfile-nginx build/ --build-arg version=${VERSION} --build-arg http_version=${HTTP_VERSION}
docker build -t phppm/nginx:${TAG} -f build/Dockerfile-nginx build/ --build-arg version="${VERSION}" --build-arg http_version="${HTTP_VERSION}"
docker tag phppm/nginx:${TAG} phppm/nginx:latest

ppm:
docker build -t phppm/ppm:${TAG} -f build/Dockerfile-ppm build/ --build-arg version=${VERSION} --build-arg http_version=${HTTP_VERSION}
docker build -t phppm/ppm:${TAG} -f build/Dockerfile-ppm build/ --build-arg version="${VERSION}" --build-arg http_version="${HTTP_VERSION}"
docker tag phppm/ppm:${TAG} phppm/ppm:latest

standalone:
docker build -t phppm/standalone:${TAG} -f build/Dockerfile-standalone build/ --build-arg version=${VERSION} --build-arg http_version=${HTTP_VERSION}
docker build -t phppm/standalone:${TAG} -f build/Dockerfile-standalone build/ --build-arg version="${VERSION}" --build-arg http_version="${HTTP_VERSION}"
docker tag phppm/standalone:${TAG} phppm/standalone:latest

push-all:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can use [PHP-PM](https://github.com/php-pm/php-pm) using Docker. We provide

### Examples

```
```sh
# change into your project folder first
cd your/symfony-project/

Expand Down Expand Up @@ -39,7 +39,7 @@ $ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --workers=16

Docker compose

```
```docker
version: "3.1"

services:
Expand All @@ -57,7 +57,7 @@ services:
You should configure PPM via the ppm.json in the root directory, which is within the container mounted to
`/var/www/`. Alternatively, you can overwrite each option using the regular cli arguments.

```
```sh
# change the ppm.json within current directory
docker run -v `pwd`:/var/www phppm/ppm config --help

Expand All @@ -72,7 +72,7 @@ docker run -v `pwd`:/var/www -p 80:80 phppm/nginx --c prod-ppm.json
If your applications requires additional php modules or other tools and libraries in your container, you
can use our image as base. We use lightweight Alpine Linux.

```
```docker
# Dockerfile
FROM phppm/nginx:1.0

Expand All @@ -82,7 +82,7 @@ RUN apk --no-cache add ca-certificates wget
# whatever you need
```

```
```sh
docker build vendor/my-image -f Dockerfile .
# now use vendor/my-image instead of `phppm/nginx`
```
2 changes: 1 addition & 1 deletion build/Dockerfile-nginx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM composer:1.9 as composer

ARG version=dev-master
ARG http_version=dev-master
RUN mkdir /ppm && cd /ppm && composer require php-pm/php-pm:${version} && composer require php-pm/httpkernel-adapter:${http_version}
RUN mkdir /ppm && cd /ppm && composer require php-pm/php-pm:"${version}" php-pm/httpkernel-adapter:"${http_version}"

FROM alpine:3.11

Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-ppm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM composer:1.9 as composer

ARG version=dev-master
ARG http_version=dev-master
RUN mkdir /ppm && cd /ppm && composer require php-pm/php-pm:${version} && composer require php-pm/httpkernel-adapter:${http_version}
RUN mkdir /ppm && cd /ppm && composer require php-pm/php-pm:"${version}" php-pm/httpkernel-adapter:"${http_version}"

FROM alpine:3.11

Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile-standalone
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM composer:1.9 as composer

ARG version=dev-master
ARG http_version=dev-master
RUN mkdir /ppm && cd /ppm && composer require php-pm/php-pm:${version} && composer require php-pm/httpkernel-adapter:${http_version}
RUN mkdir /ppm && cd /ppm && composer require php-pm/php-pm:"${version}" php-pm/httpkernel-adapter:"${http_version}"

FROM alpine:3.11

Expand Down