-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (37 loc) · 900 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
33
34
35
36
37
38
39
40
41
42
# syntax=docker/dockerfile:1.4
FROM php:8.3-cli as php
WORKDIR /app
ENV PATH "/app/bin:/app/vendor/bin:/app/build/composer/vendor/bin:$PATH"
ENV COMPOSER_HOME "/app/build/composer"
RUN <<-EOF
groupadd --gid 1000 dev;
useradd --system --create-home --uid 1000 --gid 1000 --shell /bin/bash dev;
EOF
RUN <<-EOF
apt-get update;
apt-get install -y \
apt-transport-https \
autoconf \
build-essential \
curl \
git \
less \
libgmp-dev \
libicu-dev \
libzip-dev \
libsodium-dev \
pkg-config \
unzip \
vim-tiny \
zip \
zlib1g-dev;
apt-get clean;
EOF
RUN <<-EOF
docker-php-ext-install -j$(nproc) bcmath gmp intl opcache zip;
pecl install xdebug;
docker-php-ext-enable xdebug;
EOF
COPY --link --from=composer/composer:latest-bin /composer /usr/bin/composer
COPY --link settings.ini /usr/local/etc/php/conf.d/settings.ini
USER dev