-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Dockerfile-dev
41 lines (30 loc) · 1.68 KB
/
Dockerfile-dev
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
ARG COMPOSER_VERSION=2.8.2 # https://hub.docker.com/_/composer/tags
ARG PHIVE_VERSION=0.15.3 # https://github.com/phar-io/phive/releases
ARG PHPEXTINST_VERSION=2.5.2 # https://github.com/mlocati/docker-php-extension-installer/releases
ARG UUID_VERSION=1.2.0 # https://pecl.php.net/package/uuid
FROM composer:${COMPOSER_VERSION} AS build_composer
FROM php:8.3-cli
ARG PHIVE_VERSION
ARG PHPEXTINST_VERSION
ARG UUID_VERSION
COPY --from=build_composer /usr/bin/composer /usr/local/bin/composer
RUN apt-get update && apt-get install --no-install-recommends -y git unzip wget gnupg dirmngr \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN echo 'date.timezone = UTC' > /usr/local/etc/php/conf.d/timezone.ini
RUN echo 'memory_limit = 1G' > /usr/local/etc/php/conf.d/memory_limit.ini
RUN mkdir ~/.gnupg
RUN echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf
RUN curl -fsLo /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/download/${PHPEXTINST_VERSION}/install-php-extensions && \
chmod +x /usr/local/bin/install-php-extensions
RUN install-php-extensions \
mbstring-stable \
intl-stable \
uuid-${UUID_VERSION}
RUN curl -fsLo phive.phar "https://github.com/phar-io/phive/releases/download/${PHIVE_VERSION}/phive-${PHIVE_VERSION}.phar" && \
curl -fsLo phive.phar.asc "https://github.com/phar-io/phive/releases/download/${PHIVE_VERSION}/phive-${PHIVE_VERSION}.phar.asc" && \
gpg --no-tty --keyserver hkps://keys.openpgp.org --recv-keys 0x9D8A98B29B2D5D79 && \
gpg --no-tty --verify phive.phar.asc phive.phar && \
rm phive.phar.asc && \
chmod +x phive.phar && \
mv phive.phar /usr/local/bin/phive
WORKDIR /app