- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近更改了我的 docker-compose.yml
中的一个项目在 GitLab CI 中使用 Git 存储库(通过 HTTP,而不是 HTTPS 或 SSH)而不是相对路径。
这在我的本地机器上运行良好,如果我以自己的身份登录 CI 服务器。
当它在 GitLab 下运行时,它会到达 docker-compose build
步骤并退出并出现错误(此处显示启用了 CI_DEBUG_TRACE
和 --verbose
上的 docker-compose
标志):
$ docker-compose --verbose build
++ docker-compose --verbose build
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.auth.find_config_file: Trying paths: ['/home/gitlab-runner/.docker/config.json', '/home/gitlab-runner/.dockercfg']
docker.auth.find_config_file: No config file found
urllib3.connectionpool._make_request: http://localhost:None "GET /v1.25/version HTTP/1.1" 200 559
compose.cli.command.get_client: docker-compose version 1.18.0, build 8dd22a9
docker-py version: 2.6.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.1t 3 May 2016
compose.cli.command.get_client: Docker base_url: http+docker://localunixsocket
compose.cli.command.get_client: Docker version: KernelVersion=3.10.0-693.21.1.el7.x86_64, Components=[{u'Version': u'18.02.0-ce', u'Name': u'Engine', u'Details': {u'KernelVersion': u'3.10.0-693.21.1.el7.x86_64', u'Os': u'linux', u'BuildTime': u'2018-02-07T21:17:42.000000000+00:00', u'ApiVersion': u'1.36', u'MinAPIVersion': u'1.12', u'GitCommit': u'fc4de44', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.9.3'}}], Arch=amd64, BuildTime=2018-02-07T21:17:42.000000000+00:00, ApiVersion=1.36, Platform={u'Name': u''}, Version=18.02.0-ce, MinAPIVersion=1.12, GitCommit=fc4de44, Os=linux, GoVersion=go1.9.3
compose.project.build: ldap uses an image, skipping
compose.service.build: Building cas
compose.cli.verbose_proxy.proxy_callable: docker build <- (pull=False, labels=None, target=None, nocache=False, container_limits={u'memory': None}, cache_from=None, extra_hosts=None, network_mode=None, tag=u'<our project>_cas', buildargs={}, rm=True, stream=True, path='http://<our gitlab url>/gitlab/docker/rubycas-server-docker.git', dockerfile=None, forcerm=False, shmsize=None)
docker.api.build._set_auth_headers: Looking for auth config
docker.api.build._set_auth_headers: No auth config in memory - loading from filesystem
docker.auth.find_config_file: Trying paths: ['/home/gitlab-runner/.docker/config.json', '/home/gitlab-runner/.dockercfg']
docker.auth.find_config_file: No config file found
docker.api.build._set_auth_headers: No auth config found
urllib3.connectionpool._make_request: http://localhost:None "POST /v1.25/build?q=False&pull=False&remote=http%3A%2F%2F<our gitlab url>%2Fgitlab%2Fdocker%2Frubycas-server-docker.git&t=<our project>_cas&nocache=False&forcerm=False&rm=True HTTP/1.1" 500 802
compose.cli.verbose_proxy.proxy_callable: docker build -> <generator object _stream_helper at 0x7fb49ebb1eb0>
compose.cli.errors.log_api_error: error initializing submodules: usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
or: git submodule [--quiet] init [--] [<path>...]
or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
or: git submodule [--quiet] foreach [--recursive] <command>
or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
: exit status 1
docker-compose.yml
的问题服务:
cas:
build:
context: http://<our gitlab url>/gitlab/docker/rubycas-server-docker.git
depends_on:
- "ldap"
networks:
- test-net
ports:
- "8080:8080"
FROM ruby:2.1.5
# Repo dependencies
RUN apt-get update && apt-get -y install git sqlite3
# Code
RUN git clone https://github.com/rubycas/rubycas-server.git /rubycas-server/
COPY config.yml /rubycas-server/
WORKDIR /rubycas-server/
# Pull submodules
RUN git submodule sync --recursive && git submodule update --init --recursive
# Need to downgrade to Ruby 2.1.5 but latest rack-test requires 2.2.2
RUN sed -i 's/"rack-test"/"rack-test", "~> 0\.7\.0"/' rubycas-server.gemspec
# Ruby dependencies (include database adapter)
RUN gem install bundler
RUN bundle install && bundle add sqlite3
# Create the database file and log - they're empty
RUN sqlite3 cas.db ''
# RUN touch cas.log
CMD bundle exec rubycas-server -c config.yml
最佳答案
实际解决方案
服务器使用的是非常旧版本的 git。手动将 git 包升级到最新版本解决了这个问题并允许我使用最新的 docker-ce
版本。
这似乎是 docker-ce
的最新边缘版本的问题。 .我从 18.02.0.ce-1.el7.centos
降级至17.12.1.ce-1.el7.centos
通过禁用 docker-ce-edge
repo并重新安装,问题就解决了。
关于git - 在 GitLab CI 下的 Docker Compose 中从 git 构建时出现 "error initializing submodules",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49240573/
我使用以下命令使用 Composer 删除了一个包。 composer remove sjparkinson/static-review 以上命令从 composer.json 中删除条目文件但 co
我刚刚开始使用 Composer 功能,你告诉它查看本地目录的依赖关系,这样你就可以开发一个库和一些并行使用该库的东西,而不必一直推送到 git 来更新,这是惊人的。例如 "repositories"
composer 和有什么区别和 composer.phar ? 例子: composer install composer.phar install 我一直看到使用 composer.phar 编写
阅读docker-compose -h或this official manual的帮助将为我们提供--project-directory PATH选项 docker-compose [-f ...]
我已经使用他们的安装指南在我的 Linux/Apache 服务器上的根目录(这是默认选择)中成功安装了 Composer。到目前为止,一切都非常简单,除了我必须进行的一个 php.ini 调整( de
在我的 composer.json配置文件,我有: "require": { "zendframework/zend-log" : "~2.3", }, "require-dev": {
从 Composer 安装此软件包后,我想复制位于软件包内的一些文件。 实际上,我希望在从 Composer 安装或更新软件包后,将下载的软件包中可能存在的某个文件复制到另一个目录。我用 script
我对码头公司还是个新手。我使用的是最新版本的Python、Django和Docker。我已经在这个项目上工作了两周了,我已经创建了docker-compose.yml文件,并且已经构建了我的docke
我正在尝试使用 composer 安装一个 github 项目并得到以下错误 Composer [UnexpectedValueException]您的 github.com 的 Github oau
我开发 Symfony 包的工作流程如下: 安装 Symfony 为新包创建一个 git repo,在其中放置一个 composer.json 文件 需要顶级 composer.json 中的新包,使
我正在尝试使用 composer 安装 github 项目并收到以下错误 Composer [UnexpectedValueException] 您用于 github.com 的 Github oau
我们在项目中使用了 composer。当我开发和/或向项目提交任何内容时,我通常应该使用 composer install;更新依赖项只是偶尔进行。 我们还使用 https://github.com/
我在 youtube 上学会了这个抽屉 https://www.youtube.com/watch?v=JLICaBEiJS0&list=PLQkwcJG4YTCSpJ2NLhDTHhi6XBNfk9
我知道在 onClick 中调用可组合函数是不可能的。 @Composable 调用只能在 @Composable 函数的上下文中发生 撰写版本 - alpha06 但我坚持以下要求。 要求是, 在
这是我的 docker-compose.yml 文件: version: '3.1' services: a: image: tutum/hello-world b: imag
创建Asset实例时是否有auto_increment字段类型可用。例如, Assets ID 应该是自动生成的字段,应该在运行时创建,而不是在应用程序级别提及该值。我可以通过创建一个交易处理器函数来
在 Composer 项目中,我必须添加一个库,它没有 composer.json 并且不使用命名空间。因此,我调整了项目的 composer.json 以添加库: { [...] "
当 vendor 目录中已经有一些组件被下载时.. 在上面运行 install 以及运行 update 时有什么影响? 最佳答案 所以我有同样的问题,这是我发现的: composer install
尝试运行 composer install 时出现此错误。我已经运行了 composer update,我正在尝试使用这个最新的锁定文件进行安装。没有任何帮助。 Loading composer re
当我尝试做: $ sudo php composer.phar update 我收到此警告: Warning: This development build of composer is over 3
我是一名优秀的程序员,十分优秀!