Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Error: 'No service selected' when running docker-compose up #4

Open
alexsrebernic opened this issue Dec 5, 2023 · 0 comments
Open

Comments

@alexsrebernic
Copy link

Issue Description:
When attempting to run docker-compose up, the following error is encountered: "No service selected." This appears to be related to an incorrect usage of the profiles section in the docker-compose.yml file.

Steps to Reproduce:

  1. Copy the docker-compose.yml file and Dockerfile from the ci-cd documentation in the root project directory
  2. Run docker-compose up.

Expected Behavior:
Docker Compose should start the specified services without any errors.

Actual Behavior:
Encountered the error "No service selected."

Workaround:
Remove the profiles section from both services in the docker-compose.yml file. Here's the corrected version:

version: "3.9"
services:
  synpress:
    container_name: synpress
    build: ./Dockerfile
    environment:
      - DISPLAY=display:0.0
      - CYPRESS_DOCKER_RUN=true
      - CI=true
    entrypoint: []
    working_dir: /app
    command: yarn cypress:run
    depends_on:
      - display
    networks:
      - x11

  display:
    container_name: display
    image: synthetixio/display:016121eafdfff448414894d0ca5a50b1d72b62eb-base
    environment:
      - RUN_XTERM=no
      - DISPLAY_WIDTH=800
      - DISPLAY_HEIGHT=600
    ports:
      - "8080:8080"
    networks:
      - x11

networks:
  x11:

Environment Information:

  • Operating System: Linux
  • Docker Version: Docker Desktop 24.0.7
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant