Skip to content

Latest commit

 

History

89 Commits

Folders and files

Repository files navigation

CI/CD

Description

Minimal NGINX Docker images. It's use is intended for kool.dev, but can fit in any other NGINX use-case.

Available Tags

Environment Variables

Variable Default Value Description
LISTEN 80 Changes the PORT address
ROOT /app/public Changes NGINX root directive
CLIENT_MAX_BODY_SIZE 25M Changes maximum allowed size of the client request body
PHP_FPM app:9000 Changes the address of a FastCGI server
FASTCGI_READ_TIMEOUT 60s Changes a timeout for reading a response from the FastCGI server
FASTCGI_BUFFERS 8 8k Changes the number and size of the buffers used for reading a response
FASTCGI_BUFFER_SIZE 16k Changes the size of the buffer used for reading the first part of the response received

php

Variable Default Value Description
INDEX index.php Changes the index directive

static

Variable Default Value Description
INDEX index.html Changes the index directive

Usage

With docker run:

docker run -it --rm kooldev/nginx:php nginx -v

With environment variables:

docker run -it --rm -e LISTEN=8080 kooldev/nginx:php nginx -v

With docker-compose.yml:

app:
  image: kooldev/nginx:php
  environment:
    LISTEN: "8080"

Contributing

Image checks

CI builds all three variants for linux/amd64. ARM is not supported by the bundled dockerize binary. Weekly Monday rebuilds pull the latest nginx:alpine and refresh Alpine packages without reusing build layers.

CI uses shared Bash/jq actions, pinned in the workflow. Builds, HTTP tests and Grype scans stay here. After all three jobs pass, one publisher promotes the tested/scanned digests as amd64-only indexes. See the shared release rules for publication guards and retry behavior.

Run the same configuration and HTTP checks locally after building an image:

docker build --pull --no-cache -t nginx-test:php php
bash tests/smoke.sh php nginx-test:php

Repeat for static and proxy. Tests require Docker and curl, publish only a random loopback port, and remove their containers/network afterward. PHP uses a real PHP-FPM fixture; proxy uses a Docker DNS upstream. Tests check default and overridden config, invalid config rejection, static assets, routing/query handling, denied .ht files and request body limits.

Before publication, Grype blocks high/critical findings (including unfixed ones). Full JSON reports, including lower severities, are retained as workflow artifacts. There are no vulnerability exclusions. Scan failures require investigation and an image/package fix, not disabling the gate. A successful scan is not proof that an image is vulnerability-free.

Dependencies

You should change fwd-template.json and template folder.

After any changes, we just need to run kool run template (you need kool) to compile the template and generate all version folder/files.

License

The MIT License (MIT). Please see License File for more information.

Used by

Contributors

Languages