-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (24 loc) · 996 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
25
26
27
28
29
30
31
32
FROM php:8.3.1-fpm-alpine3.19
RUN apk upgrade --no-cache && apk add --no-cache openssl
# Install Composer
RUN curl https://getcomposer.org/composer.phar > /usr/sbin/composer && chmod +x /usr/sbin/composer
CMD ["/var/app/bootstrap"]
WORKDIR /var/app
# Set up bootstrap, point at /var/app
ENV LAMBDA_TASK_ROOT="/var/app"
COPY runtime/bootstrap-container /var/app/bootstrap
COPY runtime/bootstrap.php /var/app/bootstrap.php
# set up app; order of operations optimized for maximum layer reuse
COPY composer.lock /var/app/composer.lock
COPY composer.json /var/app/composer.json
RUN cd /var/app && CI=true php /usr/sbin/composer install --prefer-dist -o
COPY *.php /var/app/
######## Uncomment these lines to add in the Lambda RIE
# Uncomment one of the below depending on local system architecture
# x86
# COPY rie/aws-lambda-rie /var/app/rie
# Arm
# COPY rie/aws-lambda-rie-arm64 /var/app/rie
# Run RIE, and have it run our bootstrap
# CMD ["/var/app/rie", "/var/app/bootstrap"]
# EXPOSE 8080