0

I'm trying to start multiple docker containers with a wsl shell runner. After running

compose_job: tags: - wsl stage: compose script: - cd /pathToComposeFile - docker-compose up dependencies: - pull_job 

the runner excited with following error:

$ docker-compose up
docker: invalid reference format: repository name must be lowercase.

the docker-compose.yml is:

version: '3' services: cron: build: cron/. container_name: cron image: cron_image ports: - 6040:6040 

The referenced images are all written in lowercase and the same command excited as expected if run manually. I already checked that docker-compose is accessible and that the docker-compose.yml is readable. How can I resolve this issue? Thank you in advance!

6
  • Can you show file docker-compose.yml? Commented Nov 25, 2021 at 12:45
  • Of course, I edited the Question. Commented Nov 25, 2021 at 12:51
  • Does this answer help? Commented Nov 25, 2021 at 13:00
  • @DV82XL Unfortanetly the answer doesn't apply to my case as I'm not using any upper case. I also changed the docker-compose.yml to a minimal example. Commented Nov 25, 2021 at 15:04
  • Why do you want to use docker-compose up in your pipeline instead of gitlab services? Do you need your API running or something, or some DB to be up? If that is the case see the following answer: stackoverflow.com/questions/66071016/…. Anyway I do not see a single use case for docker-compose, so I would strongly suggest to use gitlab services instead: docs.gitlab.com/ee/ci/services Commented Nov 25, 2021 at 15:07

1 Answer 1

0

I think service_name, container_name and env must be lowercase. Look like

version: '3' services: perihubapi: build: context: api/. args: EXTERNAL: ${external} FASERVICES: ${faservices} container_name: perihubapi image: peri_hub_api_image ports: - 6020:6020 networks: - backend volumes: - peridigm_volume:/app/peridigmJobs - paraView_volume:/app/paraView - secrets:/app/certs perihubgui: build: gui/. container_name: perihubgui image: peri_hub_gui_image ports: - 6010:6010 networks: - backend volumes: - secrets:/app/certs peridigm: build: context: peridigm/. args: GITLAB_USER: ${gitlab_user} GITLAB_TOKEN: ${gitlab_token} PERIDOX: ${peridox} container_name: peridigm image: peridigm_image ports: - 6030:6030 networks: - backend volumes: - peridigm_volume:/app/peridigmJobs paraview: build: context: paraview/. container_name: paraview image: paraview_image volumes: - paraView_volume:/app/paraView cron: build: cron/. container_name: cron image: cron_image ports: - 6040:6040 networks: - backend networks: backend: driver: bridge volumes: peridigm_volume: paraView_volume: secrets: external: true 
Sign up to request clarification or add additional context in comments.

1 Comment

I removed all uppercase in my docker-compose.yml, unfortanetly the error is the same.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.