Missing composer repository /app when building typo3 docker container
claussni opened this issue · 0 comments
Problem
Attempt to build the TYPO3 images failed because of an error in Dockerfile-TYPO3
that was previously masked by PHP Composer behavior. The local file PHP Composer repository /app is not yet mounted when the composer require
steps are started:
Step 9/11 : RUN composer require devlog/devlog:~3.0.4 && composer require kitodo/presentation
---> Running in 3d770007d9ce
[RuntimeException]
The `url` supplied for the path (/app) repository does not exist
Cause
The issue seem to come up with newer Composer versions. Even if the docker-compose file includes a volumes section, those volumes are not mounted before the image build. Thus "/app" is not available in the Docker container at build time and can not serve as Composer repository until the call to COPY /app
.
The only reason why this could have worked before must be different handling of missing repositories in PHP composer. There are hints to such changes in https://github.com/composer/composer/releases/tag/1.10.2 regarding symlink repositories.
Solution
The Dockerfile.TYPO3 needs to be fixed. In order to give PHP Composer access to the local repository, the COPY /app
statement needs to happen before the first composer require
calls.