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

Build image from phppm/nginx #19

Open
byhoratiss opened this issue Feb 13, 2019 · 1 comment
Open

Build image from phppm/nginx #19

byhoratiss opened this issue Feb 13, 2019 · 1 comment

Comments

@byhoratiss
Copy link

I don't have a lot of experience with Docker & images, but dont know where to look about this problem.

I'm trying to create a custom image starting from phppm/nginx, and then use that image from docker-compose. But when specifing the "command" (debug and static-directory options) is not using them.

# Dockerfile in phpdocker/php-ppm/Dockerfile
FROM phppm/nginx

RUN apk --no-cache add git
RUN apk --no-cache add ca-certificates wget php7-iconv php7-ftp \
    && rm -rf /var/lib/apk/*

# whatever you need
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

After building the image with: docker build phpdocker/php-ppm -t publisher/ppm-ws

Using the previous image within docker-compose: (pay attention to "image")

version: "3.0"
services:
    ppm:
      image: publisher/ppm-ws:latest
      command: --debug=1 --app-env=dev --static-directory=web/
      volumes:
        - ./:/var/www
      ports:
        - "1080:80"

Now executing docker-compose up ppm shows this:

ppm_1        | /var/www
ppm_1        | +---------------------+--------------------------+
ppm_1        | | bridge              | HttpKernel               |
ppm_1        | | host                | 127.0.0.1                |
ppm_1        | | port                | 8080                     |
ppm_1        | | workers             | 8                        |
ppm_1        | | app-env             | dev                      |
ppm_1        | | debug               | 0                        |
ppm_1        | | logging             | 1                        |
ppm_1        | | static-directory    | ""                       |
ppm_1        | | bootstrap           | PHPPM\Bootstraps\Symfony |
ppm_1        | | max-requests        | 1000                     |
ppm_1        | | populate-server-var | 1                        |
ppm_1        | | socket-path         | .ppm/run/                |
ppm_1        | | pidfile             | .ppm/ppm.pid             |
ppm_1        | | cgi-path            | /usr/bin/php-cgi7        |
ppm_1        | +---------------------+--------------------------+
ppm_1        | Starting PHP-PM with 8 workers, using StreamSelectLoop ...

Why is not using "static-directory" and "debug"?
Or better yet, how could I change this? Also tried with "environment" within docker-compose without success :(

Thank you guys for this!

@LewisMcFly
Copy link

I have the same issue, --static-directory is not taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants