Run docker-compose build in .gitlab-ci.yml

前端 未结 9 1213
臣服心动
臣服心动 2020-12-12 14:06

I have a .gitlab-ci.yml file which contains following:

image: docker:latest

services:
  - docker:dind
         


        
9条回答
  •  离开以前
    2020-12-12 15:05

    there is tiangolo/docker-with-compose which works:

    image: tiangolo/docker-with-compose
    
    stages:
      - build
      - test
      - release
      - clean
    
      
    before_script:
      - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com
    
    build:
      stage: build
      script:
        - docker-compose -f docker-compose-ci.yml build --pull 
    
    
    test1:
        stage: test
        script:
            - docker-compose -f docker-compose-ci.yml up -d
            - docker-compose -f docker-compose-ci.yml exec -T php ...
    

提交回复
热议问题