Files
cacti/docker/Dockerfile.test
Thomas Vincent 41780277d3 fix(docker): restrict development permissions and start the poller (#8453)
* fix(docker): restrict the dev stack to localhost and make the poller run

The web port bound to every interface, named volumes hid the shipped .htaccess denies, and the cron job could neither find php nor write to PID 1's output, so the poller never ran.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(docker): keep harnesses polling and restore the developer's config.php

check_docker.sh deleted an existing include/config.php on exit, health polling aborted under pipefail before the container reported, the MariaDB wait had no bound, and the BSD mktemp template left its Xs literal.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs(changelog): add fragment for #8453

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* test(e2e): move the pointer off the Deepness multiselect button

Deepness sets a zero body margin, so the unhovered #ms-button sits at the viewport origin and headless Chromium on Linux intermittently applies :hover to it.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* ci: pull pinned integration database from authenticated mirror

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-10-23 08:17:48 -04:00

34 lines
1.0 KiB
Docker

ARG CACTI_TEST_BASE=cacti-web:1.3-dev
FROM ${CACTI_TEST_BASE}
COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer
RUN apt-get update \
&& apt-get install -y --no-install-recommends git nodejs npm python3 ripgrep unzip \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /work
COPY . ./
# Rebuild the front-end libraries from package.json so the suites test the
# pinned versions rather than whatever copies the build context carried.
RUN npm_config_cache=/tmp/.npm npm ci --ignore-scripts \
&& npm run postinstall --ignore-scripts \
&& composer install --prefer-dist --no-progress --no-interaction \
&& install -d -m 0700 cache log rra \
&& touch log/cacti.log \
&& chmod -R u+rwX,go-rwx cache log rra \
&& cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini \
&& sed -i 's/^memory_limit = .*/memory_limit = 2G/' /usr/local/etc/php/php.ini \
&& git init \
&& git add --force . \
&& chown -R www-data:www-data /work
USER www-data
ENTRYPOINT ["php"]