forked from mikespub-org/seblucas-cops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine
31 lines (25 loc) · 1009 Bytes
/
Dockerfile.alpine
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
FROM php:8.2-cli-alpine AS build
# This takes too long and is messy to maintain
#RUN apk add --no-cache freetype-dev libjpeg-turbo-dev libpng-dev zlib-dev libwebp-dev \
# icu-dev \
# libzip-dev \
# && docker-php-ext-configure gd --with-freetype --with-jpeg \
# && docker-php-ext-install -j$(nproc) gd \
# && docker-php-ext-configure intl \
# && docker-php-ext-install intl \
# && docker-php-ext-install zip
# Use https://github.com/mlocati/docker-php-extension-installer instead
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions gd intl zip
COPY --from=composer /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY . /app
RUN composer install --no-dev -o -d /app
ENV PORT=80
EXPOSE $PORT
CMD ["sh", "-c", "php -S 0.0.0.0:$PORT -t /app"]
FROM build as dev-envs
RUN composer update -o -d /app
#RUN apk --no-cache add nodejs yarn
#RUN yarn