2022-12-23 12:48:45 -06:00
# syntax=docker/dockerfile:1
2023-05-12 05:28:46 -07:00
FROM php:8.2-apache
2022-12-23 12:48:45 -06:00
FROM composer/composer:latest
2023-10-03 15:36:27 -04:00
# Update image
RUN apk update && \
apk upgrade && \
rm -rf /var/cache/apk/*
# Copy source code
2023-01-11 08:38:23 -06:00
COPY . /php/
2023-02-14 16:31:03 -07:00
WORKDIR /php
2023-10-03 15:36:27 -04:00
# Perform build steps
2023-05-12 05:28:46 -07:00
RUN find . -name "composer.json" -not -path "*vendor*" -exec bash -c "dirname {} | xargs -I % composer install --working-dir=%" \;
2023-10-03 15:36:27 -04:00
2023-11-02 17:52:35 -04:00
# Set non-root user w/ ownership of /php
RUN addgroup -S automation && \
adduser -S -G automation automation && \
2023-10-03 15:36:27 -04:00
chown -R automation:automation /php/
2023-11-02 17:52:35 -04:00
2023-10-03 15:36:27 -04:00
USER automation:automation
2025-05-13 09:31:17 -07:00
#CMD ["/php/testing", "--integ"]
CMD [ "/php/testing" , "--test-pass" ]