openstandia / keycloak-dockerfiles

Dockerfiles that can be used to build Docker images with Keycloak project.
Apache License 2.0
16 stars 5 forks source link

パッケージが見つからないエラーが発生します #46

Open uchiumih opened 4 years ago

uchiumih commented 4 years ago

こちらの記事を参考に ver. 4.8.3.Final をダウンロードして以下のコマンドを実行しました。 Keycloakで実用的なリバースプロキシ型構成を構築してみよう (2/4):Keycloak超入門(7) - @IT

$ cd keycloak-dockerfiles-4.8.3.Final/reverse_proxy-based-arch-examples/kc-mod_auth_openidc-example
$ docker-compose up –d ––build

すると、以下のエラーが発生しました。

+ yum install -y httpd-2.4.6-88.el7.centos
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
No package httpd-2.4.6-88.el7.centos available.
Error: Nothing to do
ERROR: Service 'rp' failed to build: The command '/bin/sh -c set -x   && yum install -y iproute   && yum install -y httpd-${HTTPD_VERSION}   && yum clean all' returned a non-zero code: 1
uchiumih commented 4 years ago

以下のように変更をすることでエラーが消えました。

keycloak-dockerfiles-4.8.3.Final/reverse_proxy-based-arch-examples/kc-mod_auth_openidc-example/reverse_proxy/Dockerfile

 # iproute と Apache HTTPD Serverインストール
 RUN set -x \
   && yum install -y iproute \
-  && yum install -y httpd-${HTTPD_VERSION} \
+  && yum install -y httpd \
   && yum clean all 

 # mod_auth_openidcのインストール

ですが、今度は次のエラーが発生しました。

Error: Package: mod_auth_openidc-2.3.10.2-1.el7.x86_64 (/mod_auth_openidc-2.3.10.2-1.el7.x86_64)
           Requires: libhiredis.so.0.12()(64bit)
Error: Package: mod_auth_openidc-2.3.10.2-1.el7.x86_64 (/mod_auth_openidc-2.3.10.2-1.el7.x86_64)
           Requires: hiredis
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
ERROR: Service 'rp' failed to build: The command '/bin/sh -c mkdir -p /tmp/work   && cd /tmp/work   && curl -k -L -O https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/h/hiredis-${HIREDIS_VERSION}.rpm   && curl -k -L -O https://github.com/zmartzone/mod_auth_openidc/releases/download/v2.3.0/cjose-${CJOSE_VERSION}.rpm   && curl -k -L -O https://github.com/zmartzone/mod_auth_openidc/releases/download/v${MOD_AUTH_OPENIDC_SHORT_VERSION}/mod_auth_openidc-${MOD_AUTH_OPENIDC_VERSION}.rpm   && yum install -y *.rpm   && yum clean all   && rm -rf /tmp/work' returned a non-zero code: 1
uchiumih commented 4 years ago

今度は以下のように変更をすることでエラーが消えました。

keycloak-dockerfiles-4.8.3.Final/reverse_proxy-based-arch-examples/kc-mod_auth_openidc-example/reverse_proxy/Dockerfile

 ENV HTTPD_VERSION=2.4.6-88.el7.centos \
     MOD_AUTH_OPENIDC_VERSION=2.3.10.2-1.el7.x86_64 \
     MOD_AUTH_OPENIDC_SHORT_VERSION=2.3.10.2 \
-    HIREDIS_VERSION=0.12.1-1.el7.x86_64 \
+    HIREDIS_VERSION=0.12.1-2.el7.x86_64 \
     CJOSE_VERSION=0.5.1-1.el7.centos.x86_64

 # iproute と Apache HTTPD Serverインストール
naokiiiii commented 4 years ago

@uchiumih 不具合報告ありがとうございます。 CentOSのバージョンアップにより、指定するHTTPDバージョンがなくなってしまったことによるエラーです。 @uchiumih さんの対応でも問題ありませんが、ワークアラウンドとして、以下を取り込んでもらえれば回避可能です。

https://github.com/openstandia/keycloak-dockerfiles/commit/8c909f10951cc9b7d0d3f0fb38510afef8cca381#diff-362676ceef952b78ec4da0c63f34aa18

uchiumih commented 4 years ago

@naokiiiii 早速のご返答ありがとうございます。 ご提示いただいた変更は ver. 4.8.3.Final に既に含まれているので、それを取り込んでも変わりないように思うのですが、何か私が見落としていることありますでしょうか?