Когда я создаю свой докер-файл, он просто показывает это.
Кто-нибудь пробовал использовать composer в докере?
Или есть другой способ установить фларум в докер?
PS: пользователь root.
Downloading https://packagist.org/packages.json
Writing /root/.composer/cache/repo/https---packagist.org/packages.json into cache
Downloading http://packagist.org/p/provider-2013%24d6b22cfddabf0741ef0c5c720daf4f0a5f17ed112a30074bfeef5007a1e30590.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2013.json into cache
Downloading http://packagist.org/p/provider-2014%2471316c49d46d6c1e66f1d56e3cd12020169065922e83ed72e3319f00146bf8cf.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2014.json into cache
Downloading http://packagist.org/p/provider-2015-01%244a1f70479a6d65b81b75a0db8f73f0cce3fa08a6f828fe1c93bda72f1943b88d.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2015-01.json into cache
Downloading http://packagist.org/p/provider-2015-04%241bac0fe8d148a91c5820798155f858d8739ec6010801d1c60225c9cfe9f397c1.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2015-04.json into cache
Downloading http://packagist.org/p/provider-2015-07%24c848f45373be754212f1ee20cc125db54480a698619f8f8f22f0a23b5faa4ebb.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2015-07.json into cache
Downloading http://packagist.org/p/provider-2015-10%24c322c84a3171f7f09c02691dfcbce028f91bd7a33f517dec9f2901cbcdd73e25.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-2015-10.json into cache
Downloading http://packagist.org/p/provider-archived%24b1356aa53be4408a11804b506f3383f916bcacdff0f3ac5ec17b3855b7d02290.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-archived.json into cache
Downloading http://packagist.org/p/provider-latest%2420ee33635891a3e02467338b100b4a4afbb76d101faacd8b77595e2de372f325.json
Writing /root/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Downloading http://packagist.org/p/flarum/flarum%24d79b41a5761f33b7816874bad1ab1641c4eec05cd20afa578921adfb13606364.json
Writing /root/.composer/cache/repo/https---packagist.org/provider-flarum$flarum.json into cache
Installing flarum/flarum (v0.1.0-beta.4)
- Installing flarum/flarum (v0.1.0-beta.4)
Downloading https://api.github.com/repos/flarum/flarum/zipball/4be4e6209f355ffb8d522e8a43c31272d78625d6
Downloading: 100%
Writing /root/.composer/cache/files/flarum/flarum/4be4e6209f355ffb8d522e8a43c31272d78625d6.zip into cache from .//81c7ebffe780fe366049c2896d7d82fb
Extracting archive
Executing command (CWD): unzip './/81c7ebffe780fe366049c2896d7d82fb' -d '/var/www/html/flarum.me/vendor/composer/be9e411c' && chmod -R u+w '/var/www/html/flarum.me/vendor/composer/be9e411c'
Failed to download flarum/flarum from dist: Could not delete ./:
Now trying to download from source
- Installing flarum/flarum (v0.1.0-beta.4)
Cloning 4be4e6209f355ffb8d522e8a43c31272d78625d6
Executing command (CWD): git clone --no-checkout 'git://github.com/flarum/flarum.git' './' && cd './' && git remote add composer 'git://github.com/flarum/flarum.git' && git fetch composer
Failed: [RuntimeException] Could not delete ./:
[RuntimeException]
Could not delete ./:
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:216
Composer\Util\Filesystem->rmdir() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:154
Composer\Util\Filesystem->removeDirectoryPhp() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:128
Composer\Util\Filesystem->removeDirectory() at phar:///usr/local/bin/composer/src/Composer/Util/Git.php:79
Composer\Util\Git->runCommand() at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:54
Composer\Downloader\GitDownloader->doDownload() at phar:///usr/local/bin/composer/src/Composer/Downloader/VcsDownloader.php:69
Composer\Downloader\VcsDownloader->download() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:199
Composer\Downloader\DownloadManager->download() at phar:///usr/local/bin/composer/src/Composer/Installer/ProjectInstaller.php:70
Composer\Installer\ProjectInstaller->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:152
Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:323
Composer\Command\CreateProjectCommand->installRootPackage() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:141
Composer\Command\CreateProjectCommand->installProject() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:129
Composer\Command\CreateProjectCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:259
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:841
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:192
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:167
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:123
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:98
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
Как я могу решить это?
и мой докер-файл ниже
FROM php:fpm
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
chmod +x /usr/local/bin/composer
RUN apt-get -y update && \
apt-get -y install git
RUN mkdir /var/www/html/flarum.me && \
cd /var/www/html/flarum.me && \
composer create-project flarum/flarum . --stability=beta --prefer-dist -v
Проблема в файловой системе Docker, которая не позволяет вам удалять текущую работу напрямую. Чтобы решить эту проблему, просто добавьте путь к composer
создать проект.
FROM php:fpm
RUN docker-php-ext-install mysqli pdo pdo_mysql
RUN curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer && \
chmod +x /usr/local/bin/composer
RUN apt-get -y update && \
apt-get -y install git
RUN mkdir /var/www/html/flarum.me && \
cd /var/www/html && \
composer create-project flarum/flarum flarum.me --stability=beta --prefer-dist -v
Это должно сделать работу, извините, я не могу проверить это прямо сейчас.
Других решений пока нет …