Skip to content

Commit

Permalink
Adding the stable mirror for Centos (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaDos authored Feb 28, 2022
1 parent a95c3de commit 861ee2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/elasticsearch/7.11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.11.2

RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://mirror.rackspace.com\/centos-vault|g' /etc/yum.repos.d/CentOS-Linux-* && \
yum -y install zip && \
zip -q -d /usr/share/elasticsearch/lib/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
yum remove -y zip && \
Expand Down
5 changes: 4 additions & 1 deletion src/Command/Image/GenerateEs.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ protected function configure(): void
*/
public function execute(InputInterface $input, OutputInterface $output): int
{
// phpcs:disable
$fixRepo = <<<FIX
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=https://mirror.rackspace.com\/centos-vault|g' /etc/yum.repos.d/CentOS-Linux-* && \
FIX;
// phpcs:enable

foreach ($this->versionMap as $version => $versionData) {
$destination = $this->directoryList->getImagesRoot() . '/elasticsearch/' . $version;
$dataDir = $this->directoryList->getImagesRoot() . '/elasticsearch/es/';
Expand Down

0 comments on commit 861ee2e

Please sign in to comment.