mirror of
https://github.com/Cacti/cacti.git
synced 2026-10-23 19:47:06 +09:00
* security(ci): constrain dependency installs and container build boundaries Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(docker): retain shipped runtime libraries in build context Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(tooling): quote gettext paths and honor Docker base selection Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * test(auth): use certificate expiry truth in rendering assertions Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(tooling): finish Docker layer and regex scan findings Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(ci): preserve documentation badge anchors without alternation Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * test(ci): preserve contributor badges and enforce Python coverage Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * ci: share changed-code coverage contracts and enforce shell policy Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * fix(ci): enforce private review files and run path regressions Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * test: measure changed gettext shell coverage Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> * test: pin coverage to the reviewed PR revision Signed-off-by: Thomas Vincent <thomasvincent@gmail.com> --------- Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
34 lines
1.0 KiB
Docker
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 . ./
|
|
|
|
# include/js/htmx.js is generated from package.json rather than committed,
|
|
# and the htmx suites fail without it.
|
|
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"]
|