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"]