Skip to content

Commit ce5e3f3

Browse files
authored
Fix images (#84)
1 parent f9bc857 commit ce5e3f3

File tree

8 files changed

+23
-7
lines changed

8 files changed

+23
-7
lines changed

images/elasticsearch/7.11/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FROM docker.elastic.co/elasticsearch/elasticsearch:7.11.2
22

3-
RUN yum -y install zip && \
3+
RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
4+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* && \
5+
yum -y install zip && \
46
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
57
yum remove -y zip && \
68
yum -y clean all && \

images/elasticsearch/es/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM docker.elastic.co/elasticsearch/elasticsearch:{%version%}
22

3-
RUN yum -y install zip && \
3+
RUN {%fix_repos%}yum -y install zip && \
44
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
55
yum remove -y zip && \
66
yum -y clean all && \

images/php/8.0-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is automatically generated. Do not edit directly. #
2-
FROM php:8.0-cli
2+
FROM php:8.0.14-cli
33

44
ARG COMPOSER_VERSION=2.1.14
55
ARG MAGENTO_ROOT=/app

images/php/8.0-fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is automatically generated. Do not edit directly. #
2-
FROM php:8.0-fpm
2+
FROM php:8.0.14-fpm
33

44
ARG MAGENTO_ROOT=/app
55

images/php/8.1-cli/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is automatically generated. Do not edit directly. #
2-
FROM php:8.1-cli
2+
FROM php:8.1.1-cli
33

44
ARG COMPOSER_VERSION=2.1.14
55
ARG MAGENTO_ROOT=/app

images/php/8.1-fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is automatically generated. Do not edit directly. #
2-
FROM php:8.1-fpm
2+
FROM php:8.1.1-fpm
33

44
ARG MAGENTO_ROOT=/app
55

src/Command/Image/GenerateEs.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ protected function configure(): void
103103
*/
104104
public function execute(InputInterface $input, OutputInterface $output): int
105105
{
106+
$fixRepo = <<<FIX
107+
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
108+
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* && \
109+
110+
FIX;
106111
foreach ($this->versionMap as $version => $versionData) {
107112
$destination = $this->directoryList->getImagesRoot() . '/elasticsearch/' . $version;
108113
$dataDir = $this->directoryList->getImagesRoot() . '/elasticsearch/es/';
@@ -120,6 +125,7 @@ public function execute(InputInterface $input, OutputInterface $output): int
120125
[
121126
'{%version%}' => $versionData['real-version'],
122127
'{%single_node%}' => $versionData['single-node'] ? self::SINGLE_NODE : '',
128+
'{%fix_repos%}' => ($version === '7.11') ? $fixRepo : '',
123129
]
124130
)
125131
);

src/Command/Image/GeneratePhp.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ class GeneratePhp extends Command
2828
private const NAME = 'image:generate:php';
2929
private const SUPPORTED_VERSIONS = ['7.2', '7.3', '7.4', '8.0', '8.1'];
3030

31+
private const VERSION_MAP = [
32+
'7.2' => '7.2',
33+
'7.3' => '7.3',
34+
'7.4' => '7.4',
35+
'8.0' => '8.0.14',
36+
'8.1' => '8.1.1'
37+
];
38+
3139
private const EDITION_CLI = 'cli';
3240
private const EDITION_FPM = 'fpm';
3341
private const EDITIONS = [self::EDITION_CLI, self::EDITION_FPM];
@@ -296,7 +304,7 @@ private function buildDockerfile(string $dockerfile, string $phpVersion, string
296304
$this->filesystem->get($dockerfile),
297305
[
298306
'{%note%}' => '# This file is automatically generated. Do not edit directly. #',
299-
'{%version%}' => $phpVersion,
307+
'{%version%}' => self::VERSION_MAP[$phpVersion],
300308
'{%composer_version%}' => $this->semver::satisfies($phpVersion, '<8.0')
301309
? '1.10.22'
302310
: '2.1.14',

0 commit comments

Comments
 (0)