forked from awsdocs/aws-doc-sdk-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 585 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# syntax=docker/dockerfile:1
FROM php:8.2-apache
FROM composer/composer:latest
# Update image
RUN apk update && \
apk upgrade && \
rm -rf /var/cache/apk/*
# Copy source code
COPY . /php/
WORKDIR /php
# Perform build steps
RUN find . -name "composer.json" -not -path "*vendor*" -exec bash -c "dirname {} | xargs -I % composer install --working-dir=%" \;
# Set non-root user w/ ownership of /php
RUN addgroup -S automation && \
adduser -S -G automation automation && \
chown -R automation:automation /php/
USER automation:automation
CMD ["/php/testing", "--integ"]