Skip to content

Commit e8e2b14

Browse files
committed
MCLOUD-10406: update magento/magento-cloud-docker-php:8.2-cli-1.3.5 to stop clearing composer cache
1 parent 1dc3a11 commit e8e2b14

File tree

9 files changed

+24
-21
lines changed

9 files changed

+24
-21
lines changed

images/php/7.2-cli/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,8 @@ RUN apt-get update \
8383
zip \
8484
&& rm -rf /var/lib/apt/lists/*
8585

86-
# Install PyYAML
87-
RUN pip3 install --upgrade setuptools \
88-
&& pip3 install pyyaml
86+
# Install Python packages
87+
RUN pip3 install --upgrade setuptools && pip3 install pyyaml
8988

9089
# Install Grunt
9190
RUN npm install -g grunt-cli

images/php/7.3-cli/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ RUN apt-get update \
8181
zip \
8282
&& rm -rf /var/lib/apt/lists/*
8383

84-
# Install PyYAML
85-
RUN pip3 install --upgrade setuptools \
86-
&& pip3 install pyyaml
84+
# Install Python packages
85+
RUN pip3 install --upgrade setuptools && pip3 install pyyaml
8786

8887
# Install Grunt
8988
RUN npm install -g grunt-cli

images/php/7.4-cli/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,8 @@ RUN apt-get update \
7777
zip \
7878
&& rm -rf /var/lib/apt/lists/*
7979

80-
# Install PyYAML
81-
RUN pip3 install --upgrade setuptools \
82-
&& pip3 install pyyaml
80+
# Install Python packages
81+
RUN pip3 install --upgrade setuptools && pip3 install pyyaml
8382

8483
# Install Grunt
8584
RUN npm install -g grunt-cli

images/php/8.0-cli/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ RUN apt-get update \
7474
zip \
7575
&& rm -rf /var/lib/apt/lists/*
7676

77-
# Install PyYAML
78-
RUN pip3 install --upgrade setuptools \
79-
&& pip3 install pyyaml
77+
# Install Python packages
78+
RUN pip3 install --upgrade setuptools && pip3 install pyyaml
8079

8180
# Install Grunt
8281
RUN npm install -g grunt-cli

images/php/8.1-cli/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ RUN apt-get update \
7474
zip \
7575
&& rm -rf /var/lib/apt/lists/*
7676

77-
# Install PyYAML
78-
RUN pip3 install --upgrade setuptools \
79-
&& pip3 install pyyaml
77+
# Install Python packages
78+
RUN pip3 install --upgrade setuptools && pip3 install pyyaml
8079

8180
# Install Grunt
8281
RUN npm install -g grunt-cli

images/php/8.2-cli/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ RUN apt-get update \
7272
libyaml-dev \
7373
libzip-dev \
7474
zip \
75+
python3-yaml \
7576
&& rm -rf /var/lib/apt/lists/*
7677

77-
# Install PyYAML
78-
RUN pip3 install --upgrade setuptools \
79-
&& pip3 install pyyaml
78+
# Install Python packages
79+
8080

8181
# Install Grunt
8282
RUN npm install -g grunt-cli

images/php/8.2-fpm/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ RUN apt-get update \
5353
libyaml-dev \
5454
libzip-dev \
5555
zip \
56+
python3-yaml \
5657
&& rm -rf /var/lib/apt/lists/*
5758

5859
# Install MailHog

images/php/cli/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,8 @@ RUN apt-get update \
4141
{%packages%} \
4242
&& rm -rf /var/lib/apt/lists/*
4343

44-
# Install PyYAML
45-
RUN pip3 install --upgrade setuptools \
46-
&& pip3 install pyyaml
44+
# Install Python packages
45+
{%python_packages%}
4746

4847
# Install Grunt
4948
RUN npm install -g grunt-cli

src/Command/Image/GeneratePhp.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,13 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string
286286
}
287287
}
288288

289+
if ($this->semver::satisfies($phpVersion, '8.2.*')) {
290+
$packages = array_merge($packages, ['python3-yaml']);
291+
$pythonPackages = '';
292+
} else {
293+
$pythonPackages = 'RUN pip3 install --upgrade setuptools && pip3 install pyyaml';
294+
}
295+
289296
$volumes = [
290297
'root' => [
291298
'def' => 'VOLUME ${MAGENTO_ROOT}',
@@ -319,6 +326,7 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string
319326
'{%env_php_extensions%}' => $phpExtEnabledDefault
320327
? 'ENV PHP_EXTENSIONS ' . implode(' ', $phpExtEnabledDefault)
321328
: '',
329+
'{%python_packages%}' => $pythonPackages,
322330
'{%volumes_cmd%}' => rtrim($volumesCmd),
323331
'{%volumes_def%}' => rtrim($volumesDef)
324332
]

0 commit comments

Comments
 (0)