Skip to content

Add Dockerfile.test for local tests - #217

Open
joanhey wants to merge 3 commits into
rryqszq4:developmentfrom
joanhey:docker-test
Open

Add Dockerfile.test for local tests#217
joanhey wants to merge 3 commits into
rryqszq4:developmentfrom
joanhey:docker-test

Conversation

@joanhey

@joanhey joanhey commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

With this dockerfile is easier to make changes to the src code and then pass the tests locally.

Added to the readme:

Only to developers of ngx-php code !!

To build and run the Ubuntu 24.04 regression tests locally:

$ docker build --file Dockerfile.test --tag ngx-php-test .
$ docker run --rm ngx-php-test

To test locally all tests

docker run --rm ngx-php-test:local bash -c "export PATH=/src/nginx/sbin:/usr/bin:/bin; export TRAVIS_BUILD_DIR=/src; prove -r t"

To test only 1 test locally

docker run --rm ngx-php-test:local bash -c "export PATH=/src/nginx/sbin:/usr/bin:/bin; export TRAVIS_BUILD_DIR=/src; prove -v t/024-ngx_request_body.t"

We can also pass the arguments in the docker build

docker build --no-cache --build-arg PHP_VERSION=8.5 --build-arg NGINX_VERSION=1.31.4 ...

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

Successfully merging this pull request may close these issues.

1 participant