我想創建一個Dockerfile自動HumHub的安裝安裝指南如下:https://www.humhub.org/docs/guide-admin-installation.htmlPHP和作曲與碼頭工人身材:未能克隆混帳
然而,每當構建腳本運行的作曲家,我得到以下錯誤:
Changed current directory to /root/.composer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing fxp/composer-asset-plugin (v1.1.1)
Downloading: Connecting... Failed to download fxp/composer-asset-plugin from dist: Could not authenticate against github.com
Now trying to download from source
- Installing fxp/composer-asset-plugin (v1.1.1)
Cloning daca454b94539a4e6d30937dfc6b817eceb03f28
Writing lock file
Generating autoload files
Loading composer repositories with package information
Updating dependencies (including require-dev)
Failed to clone the [email protected]:jquery/jquery-dist.git repository, try running in interactive mode so that you can enter your GitHub credentials
[RuntimeException]
Failed to execute git clone --mirror '[email protected]:jquery/jquery-dist.git' '/root/.composer/cache/vcs/git-github.com-jquery-jquery-dist.git/'
據推測,這是通過使用GIT中安裝jQuery和期待的git作曲家引起預先配置與GIT訪問憑證。但是,爲Docker構建腳本提供git訪問憑據是沒有意義的。
我試圖強制git和作曲家使用https(請參閱How to force Composer to use https:// instead of git://?),但它似乎沒有所需的效果。這可能是由作曲家插件composer-asset-plugin中的錯誤引起的嗎?
這裏是構建文件:
FROM orukami/alpine-php:5.6
ENV WWW_ROOT /var/www
ENV PUBLIC_ROOT /var/www/public
COPY nginx /etc/nginx
COPY fpm /etc/php/fpm
COPY supervisord.conf /etc/supervisord.conf
COPY entrypoint.sh/
RUN apk add -U nginx supervisor git curl && \
mkdir -p /var/www && mkdir -p ${WWW_ROOT} && \
rm -rf /var/cache/apk/* && \
chmod +x /entrypoint.sh
RUN git clone https://github.com/humhub/humhub.git /var/www/public
RUN cd /var/www/public && curl -sS https://getcomposer.org/installer | php
RUN git config --global url."https://".insteadOf "git://" && cd /var/www/public && \
./composer.phar config --global github-protocols https && \
./composer.phar global require "fxp/composer-asset-plugin:~1.1.0" && \
./composer.phar update
WORKDIR ${WWW_ROOT}
EXPOSE 80 443
VOLUME /var/www/public
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/usr/bin/supervisord"]
這必須是一個非常普遍的問題,但是我無法找到任何解決方案都在網上。