1
1
#syntax=docker/dockerfile-upstream:1
2
2
# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)
3
- FROM ubuntu:24.04
3
+ FROM ubuntu:24.04 as base1
4
4
LABEL authors="Julien Neuhart <
[email protected] >, David Négrier <
[email protected] >"
5
5
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
6
+ FROM base1 as base
6
7
7
8
# Fixes some weird terminal issues such as broken clear / CTRL+L
8
9
#ENV TERM=linux
@@ -13,7 +14,7 @@ ENV DEBIAN_FRONTEND=noninteractive
13
14
ARG PHP_VERSION
14
15
ARG TARGETOS
15
16
ARG TARGETARCH
16
- ARG BLACKFIRE_VERSION=1
17
+ ARG BLACKFIRE_VERSION=2
17
18
ONBUILD ARG TARGETOS=${TARGETOS}
18
19
ONBUILD ARG TARGETARCH=${TARGETARCH}
19
20
ONBUILD ARG BLACKFIRE_VERSION=${BLACKFIRE_VERSION}
@@ -32,26 +33,32 @@ ENV PHP_VERSION=${PHP_VERSION}
32
33
33
34
# Install php an other packages
34
35
RUN apt update \
35
- && apt install -y software-properties-common \
36
+ && apt upgrade -y \
37
+ && apt install -y software-properties-common --no-install-recommends \
36
38
&& add-apt-repository ppa:ondrej/php \
39
+ && apt remove --purge -y software-properties-common \
40
+ && apt autoremove -y \
37
41
&& apt install -y --no-install-recommends \
38
- git \
39
42
nano \
40
43
sudo \
44
+ git \
41
45
iproute2 \
42
- openssh-client \
43
46
procps \
47
+ curl \
44
48
unzip \
45
49
ca-certificates \
46
- curl \
50
+ openssh-client \
51
+ && apt clean \
52
+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
53
+ RUN apt update \
54
+ && apt install -y --no-install-recommends \
47
55
php${PHP_VERSION}-cli \
48
56
php${PHP_VERSION}-curl \
49
57
php${PHP_VERSION}-mbstring \
50
58
php${PHP_VERSION}-opcache \
51
59
php${PHP_VERSION}-readline \
52
60
php${PHP_VERSION}-xml \
53
61
php${PHP_VERSION}-zip \
54
- && if [[ "${PHP_VERSION}" =~ ^7 ]]; then apt install -y --no-install-recommends php${PHP_VERSION}-json; fi \
55
62
&& apt clean \
56
63
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
57
64
@@ -403,3 +410,6 @@ ONBUILD RUN if [ -n "$NODE_VERSION" ]; then \
403
410
sudo apt clean && \
404
411
sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*; \
405
412
fi;
413
+
414
+ FROM base as step4
415
+ FROM step4 as final
0 commit comments