環境構築にて、aptコマンド時、E: Sub-process /usr/bin/dpkg returned an error code (1)が発生してしまう件について

実現したいこと

Dockerにて環境構築をしたい

前提

PHP・Symfonyにて、ECサイトを構築しています。
PHPのバージョンを7.2より7.4にアップデートするため、Dockerfileを改修しました。

イメージは、php:7.4-apache を使用
Dockerfileのaptコマンドにて、下記のエラーが発生しています。
下記、コマンド使用

docker-compose -p プロジェクト名 -f docker-compose.yml build

発生している問題・エラーメッセージ

86.35 Install git for emacs 86.36 install/git: Handling install of emacsen flavor emacs 86.36 install/git: Byte-compiling for emacs 86.36 + emacs -batch -q -no-site-file -f batch-byte-compile git.el git-blame.el 86.43 Install elpa-dash for emacs 86.43 install/dash-2.17.0: Handling install of emacsen flavor emacs 86.43 install/dash-2.17.0: byte-compiling for emacs 86.84 Install elpa-with-editor for emacs 86.84 install/with-editor-3.0.2: Handling install of emacsen flavor emacs 86.84 install/with-editor-3.0.2: byte-compiling for emacs 87.16 Install elpa-transient for emacs 87.16 install/transient-0.2.0.30: Handling install of emacsen flavor emacs 87.16 install/transient-0.2.0.30: byte-compiling for emacs 87.59 Install elpa-git-commit for emacs 87.60 install/git-commit-2.99.0: Handling install of emacsen flavor emacs 87.60 install/git-commit-2.99.0: byte-compiling for emacs 88.28 Install elpa-magit for emacs 88.28 install/magit-2.99.0: Handling install of emacsen flavor emacs 88.28 install/magit-2.99.0: byte-compiling for emacs 92.68 Setting up git-el (1:2.30.2-1+deb11u2) ... 92.71 Install git for emacs 92.71 install/git: Handling install of emacsen flavor emacs 92.71 install/git: Byte-compiling for emacs 92.71 + emacs -batch -q -no-site-file -f batch-byte-compile git.el git-blame.el 92.78 Install git for emacs 92.78 install/git: Handling install of emacsen flavor emacs 92.78 install/git: Byte-compiling for emacs 92.78 + emacs -batch -q -no-site-file -f batch-byte-compile git.el git-blame.el 92.85 Setting up emacs (1:27.1+1-3.1+deb11u2) ... 92.86 Setting up git-all (1:2.30.2-1+deb11u2) ... 92.87 Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.2+dfsg-1+deb11u1) ... 92.90 Processing triggers for libc-bin (2.31-13+deb11u5) ... 92.92 Errors were encountered while processing: 92.92 elpa-magit 92.97 E: Sub-process /usr/bin/dpkg returned an error code (1)

該当のソースコード

Docker

1FROM php:7.4-apache 2 3ENV XDEBUG_VERSION 2.8.0 4ENV XDEBUG_SHA256 cb1d117ecbec7409a408cf24e59d92f7e3816fe8e2331dd0ffc3dce60228c264 5ENV USER_HOME /home/www-data 6 7RUN set -x && apt update && apt install -y \ ← ここでエラーが発生 8 vim \ 9 zip \ 10 zlib1g-dev \ 11 git-all \ 12 curl \ 13 nano \ 14 locales \ 15 libpng-dev \ 16 libjpeg-dev \ 17 gnupg \ 18 iputils-ping \ 19以下略

試したこと

下記の記事を参考にして、原因を探ったり、対応してみたのですが、解決に至りませんでした。
あまり知見も少なく、理解が及ばないところが多くあります…。

https://qiita.com/yukari-n/items/d1b17bd37036f120153c
https://serverlog.jp/apt-get-dependence/
https://qiita.com/Crow314/items/794cabf5603cc5938855

補足情報(FW/ツールのバージョンなど)

Symfony:3.4.35
今回、バージョンをアップ
PHP:7.2 → 7.4
Apache
Docker
Make

コメントを投稿

0 コメント