Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose exec doesn't work Error: No such service #6318

Closed
ghost opened this issue Nov 2, 2018 · 4 comments
Closed

docker-compose exec doesn't work Error: No such service #6318

ghost opened this issue Nov 2, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Nov 2, 2018

I cannot run docker-compose exec with my service

Main log
Creating epm-adpt_adaptation-integration-test_1 ... done $ docker-compose exec adaptation-integration-test bash -c '/activator "testOnly *IntegrationTest"' No such service: adaptation-integration-test

docker-compose-integration-test.yml file

version: '3'

services:
    adaptation-integration-test:
        image: ${ARTIFACTORY_REPO}/epm-adpt/adaptation:${CI_COMMIT_TAG}-${CI_PIPELINE_ID}
        env_file:
            - .env
        environment:
            - DOMAIN_ENV=${DOMAIN_ENV}
        build:
            context: .
        depends_on:
            - "mongo-test"
        logging:
          driver: "json-file"
          options:
            max-size: "50m"
            max-file: "5"

    mongo-test:
        image: mongo:3.0.2
        ports:
            - 127.0.0.1:27017:27017
        volumes:
            - mongodb:/data/db
            - ./mongo/mongod.conf:/etc/mongo/mongod.conf
        logging:
          driver: "json-file"
          options:
            max-size: "50m"
            max-file: "5"

volumes:
    mongodb:
```

Run script
```

     - docker-compose -f docker-compose-integration-test.yml up -d --force-recreate --remove-orphans
      - docker-compose exec adaptation-integration-test bash -c '/activator "testOnly *IntegrationTest"'
      - docker-compose down
      - docker system prune -f 
```
Could you help me and clarifay what i do wrong?
@ghost ghost changed the title docker-compose exec doesn't work docker-compose exec doesn't work Error: No such service Nov 2, 2018
@shin-
Copy link

shin- commented Nov 2, 2018

Hi @tr1kss

Please use the issue template. Thank you!

@crossdot

This comment has been minimized.

@shin-
Copy link

shin- commented Nov 14, 2018

Since there's no update from OP I'm gonna close this, but feel free to update with the required information if this isn't resolved.

@shin- shin- closed this as completed Nov 14, 2018
@thirimyothant-next
Copy link

ERROR: No such service: app
What is this error ? I cant install composer .
My composer file is as below ...

php:
build: ./docker/php
volumes:
- ../../arigatou:/var/www/arigatou
- ./docker/php/php.ini:/etc/php.ini
- ./docker/httpd/httpd.conf:/etc/httpd/conf/httpd.conf
- ../../arigatou/data/mysql:/var/lib/mysql
- ./docker/php/xdebug.ini:/etc/php.d/xdebug.ini
- ./docker/mysql:/tmp/mysql.sock
ports:
- 80:80
links:
- db

db:
image: mysql:5.5
volumes:
- ./docker/mysql/my.cnf:/etc/mysql/my.cnf
- ./docker/mysql/initdb.d:/docker-entrypoint-initdb.d
expose:
- 3306
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: arigatouya
MYSQL_USER: arigatouya_user
MYSQL_PASSWORD: pHHFeX8xzGuxjMRz
command: --innodb-use-native-aio=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants