LoginSignup
2
1

More than 3 years have passed since last update.

centos6を使っていたdocker環境でサポート切れを対応する

Posted at

原因

12月に入ってから今まで使えていたDocker環境が立ち上げられなくなっていたので調べたところ、centos6が11月末でサポート切れ(End Of Life)になったことに伴いepelパッケージが導入できなくなっていた。

変更前

RUN rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

リポジトリの場所が404になっていたので、アーカイブのディレクトリを参照するように変更。

変更後

FROM centos:6
RUN sed -i "s|#baseurl=|baseurl=|g" /etc/yum.repos.d/CentOS-Base.repo
RUN sed -i "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-Base.repo
RUN sed -i "s|http://mirror\.centos\.org/centos/\$releasever|https://vault\.centos\.org/6.10|g" /etc/yum.repos.d/CentOS-Base.repo
RUN rpm -ivh http://dl.fedoraproject.org/pub/archive/epel/6/i386/epel-release-6-8.noarch.rpm

参考にした記事

http://smoogespace.blogspot.com/2020/10/rhel-6centos-6scilin-6epel-6-end-of.html
https://qiita.com/y-do/items/b23d24a647cb99528b16

ほんとはサポート切れに伴ってcentos7にアップデートするのがベストだと思いますが、大人の事情でできないやつもありますよね。。

2
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1