-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 875 Bytes
/
Dockerfile
File metadata and controls
37 lines (26 loc) · 875 Bytes
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
33
34
35
36
37
ARG PHP_VERSION=8.3
FROM composer:lts AS composer
FROM php:$PHP_VERSION-cli
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
libicu-dev \
libfreetype-dev \
libjpeg62-turbo-dev \
libpng-dev \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd intl
RUN pecl channel-update pecl.php.net \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug
RUN cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
COPY --from=composer /usr/bin/composer /usr/bin/composer
RUN groupadd -g 1000 herbie && useradd -m -u 1000 -g herbie herbie
RUN mkdir /app && chown -R herbie:herbie /app
USER herbie
WORKDIR /app
VOLUME /app
EXPOSE 8888
CMD ["php", "-S", "0.0.0.0:8888", "-t", "/app/web"]