0
我爲我的Symfony項目使用了docker容器。 我已經更新了我的composer.json,我試圖通過執行此下載新的供應商:在緩存中執行Docker-Compose中的Symfony Composer更新錯誤
[email protected]:~/workspace/project$ docker-compose run -u 1000 --rm --no-deps composer update
Cannot create cache directory /composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Cannot create cache directory /composer/cache/repo/github.com/delphiki/BazingaJsTranslationBundle/, or directory is not writable. Proceeding without cache
Could not fetch https://api.github.com/repos/delphiki/BazingaJsTranslationBundle, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+ff31a67c2b28+2017-04-06+0645
to retrieve a token. It will be stored in "/composer/auth.json" for future use by Composer.
Token (hidden):
Token stored successfully.
[RuntimeException]
/composer/cache/vcs does not exist and could not be created.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
我缺少什麼?
悲傷你從來沒有得到及時的響應:(你有沒有解決這個問題?我遇到了同樣的問題,我想這是因爲容器中的/ composer文件夾具有root權限,但是您將選項作爲UID 1000運行。我的猜測是,您需要編寫Dockerfile來擴展作曲家的形象和設置你需要的權限 – DinoAmino
@DinoAmino我已經做了一個解決方法,而不是。請看我的回答:) – gplus