-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Dockerfile-dev
42 lines (31 loc) · 1.73 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
42
ARG COMPOSER_VERSION=2.8.3 # https://hub.docker.com/_/composer/tags
ARG PHIVE_VERSION=0.15.3 # https://github.com/phar-io/phive/releases
ARG PHPEXTINST_VERSION=2.7.3 # https://github.com/mlocati/docker-php-extension-installer/releases
ARG UUID_VERSION=1.2.1 # https://pecl.php.net/package/uuid
FROM composer:${COMPOSER_VERSION} AS build_composer
# we run the least supported version (8.3)
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