Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose を実行しましたが、エラー終了してしまいます。 #4

Open
tmori opened this issue Jul 8, 2022 · 2 comments

Comments

@tmori
Copy link

tmori commented Jul 8, 2022

概要

2022/7/8時点で最新のものをクローンし、docker-compose を実行したところ、エラーが発生しました。
再現手順は以下のとおりとなります。エラーログから、対処方法が推測できましたので、対処案を最後に
記載しております。この方法で問題ないでしょうか?

環境

$ uname -a
Linux hako-athrill 5.13.0-51-generic #58~20.04.1-Ubuntu SMP Tue Jun 14 11:29:12 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.4 LTS"

再現手順

こちらの手順に従い、以下のように環境を構築しました。

git clone https://github.com/exment-git/docker-exment.git

その後、php74_mysql の dockerイメージ作成を実行

cd docker-exment/build/php74_mysql/
docker-compose up

しばらくすると、以下のように、エラーが発生しました。

Info from https://repo.packagist.org: #StandWithUkraine
Using version ^4.4 for exceedone/exment
./composer.json has been updated
Running composer update exceedone/exment
Loading composer repositories with package information
Updating dependencies
Lock file operations: 49 installs, 0 updates, 0 removals
  - Locking box/spout (v3.3.0)
  - Locking composer/ca-bundle (1.3.2)
  - Locking composer/composer (2.3.9)
  :
 43/49 [========================>---]  87%
 45/49 [=========================>--]  91%
 47/49 [==========================>-]  95%
 49/49 [============================] 100%

In PluginManager.php line 762:
                                                                               
  kylekatarnls/update-helper contains a Composer plugin which is blocked by y  
  our allow-plugins config. You may add it to the list if you consider it saf  
  e.                                                                           
  You can run "composer config --no-plugins allow-plugins.kylekatarnls/update  
  -helper [true|false]" to enable it (true) or disable it explicitly and supp  
  ress this exception (false)                                                  
  See https://getcomposer.org/allow-plugins    

対処案

エラー内容に従い、以下の一文を追加したところ、起動成功しました。
この方法で大丈夫でしょうか?

docker-exment/build/php74_mysql$ git diff .
diff --git a/build/php74_mysql/php/Dockerfile b/build/php74_mysql/php/Dockerfile
index 2c76fab..ef3a999 100644
--- a/build/php74_mysql/php/Dockerfile
+++ b/build/php74_mysql/php/Dockerfile
@@ -19,6 +19,7 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
 RUN mkdir /var/www/exment
 WORKDIR /var/www/exment
 RUN COMPOSER_MEMORY_LIMIT=-1 composer create-project laravel/laravel=${LARAVEL_VERSION} .
+RUN COMPOSER_MEMORY_LIMIT=-1 composer config --no-plugins allow-plugins.kylekatarnls/update-helper true
 RUN COMPOSER_MEMORY_LIMIT=-1 composer require exceedone/exment
 
 RUN php artisan vendor:publish --provider="Exceedone\\Exment\\ExmentServiceProvider"

上記修正を実施したところ、以下のようなログが出力され、Webサーバーが起動したように見えます。

Digest: sha256:10f14ffa93f8dedf1057897b745e5ac72ac5655c299dade0aa434c71557697ea
Status: Downloaded newer image for nginx:latest
Creating php74_mysql_php_1 ... done
Creating php74_mysql_web_1 ... done
Attaching to php74_mysql_php_1, php74_mysql_web_1
web_1  | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
web_1  | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
web_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
php_1  | [08-Jul-2022 02:27:28] NOTICE: fpm is running, pid 1
web_1  | 10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
php_1  | [08-Jul-2022 02:27:28] NOTICE: ready to handle connections
web_1  | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version
web_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
web_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
web_1  | /docker-entrypoint.sh: Configuration complete; ready for start up
web_1  | 2022/07/08 02:27:29 [notice] 1#1: using the "epoll" event method
web_1  | 2022/07/08 02:27:29 [notice] 1#1: nginx/1.23.0
web_1  | 2022/07/08 02:27:29 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6) 
web_1  | 2022/07/08 02:27:29 [notice] 1#1: OS: Linux 5.13.0-51-generic
web_1  | 2022/07/08 02:27:29 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker processes
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 30
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 31
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 32
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 33
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 34
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 35
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 36
web_1  | 2022/07/08 02:27:29 [notice] 1#1: start worker process 37
@hirossyi73
Copy link

@tmori
ありがとうございます。
composer v2.2より動作が変わったようです。
その内容で問題ありません。

@esm-tmori
Copy link

ご確認,ありがとうございます!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants