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

Error attempting to ecs-cli compose up #11

Closed
nathanleclaire opened this issue Oct 8, 2015 · 11 comments
Closed

Error attempting to ecs-cli compose up #11

nathanleclaire opened this issue Oct 8, 2015 · 11 comments
Assignees
Labels
Milestone

Comments

@nathanleclaire
Copy link

Created a cluster running on two instances like specified in the examples.

This is my compose file (docker-compose-prod.yml):

web:
    image: nathanleclaire/laraveldocker_web
    links:
     - db
     - redis
     - beanstalkd
    ports:
     - "80:80"
    volumes:
     - /var/lib/lightning/mysql:/var/lib/lightning/mysql
db:
    image: mysql
    environment:
        MYSQL_ROOT_PASSWORD: password
    volumes:
     - /var/lib/mysql
redis:
    image: redis
beanstalkd:
    image: nathanleclaire/laraveldocker_beanstalkd

When I run:

$ ecs-cli compose -f docker-compose-prod.yml up
ERRO[0000] Error registering task definition             error=ClientException: host.sourcePath should not be blank.
        status code: 400, request id: b7a2c30b-6e0f-11e5-a4a1-6b2efea4c01d family=0x820c5e110
ERRO[0000] Create task definition failed                 error=ClientException: host.sourcePath should not be blank.
        status code: 400, request id: b7a2c30b-6e0f-11e5-a4a1-6b2efea4c01d
FATA[0000] ClientException: host.sourcePath should not be blank.
        status code: 400, request id: b7a2c30b-6e0f-11e5-a4a1-6b2efea4c01d

Seems that sourcePath is not getting set as it should be in the task definition.

@pleerock
Copy link

Have the same problem with even such a simple configuration:

data-container:
  image: mongo:3.1.9
  volumes:
    - /data/db

looks like volumes are not working at all? When this gonna be fixed, and is there a temporary solution for now?

@huanganqing
Copy link

mysql:
  build: .
  command: /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --log-error=/var/log/mysql/error.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --bind-address=0.0.0.0
  # https://github.com/docker-library/mysql/blob/master/5.6/Dockerfile
  ports:
   - "3306:3306"
solr:
  build: .
  working_dir: /root/solr/example/
  command: java -jar start.jar
  ports:
   - "8984:8984"
ui:
  build: .
  working_dir: /root/insurance_ui/
  command: python httpd.py
  ports:
   - "9090:9090"
api:
  build: .
  working_dir: /root/insurance_api/
  command:  python manage.py runserver 0.0.0.0:7000
  ports:
   - "7000:7000"
  links:
   - mysql:mysql
   - solr:solr
➜  ecs  ./ecs-cli compose -f docker-compose.yml up
WARN[0000] Skipping unsupported YAML option...           option name=build
WARN[0000] Skipping unsupported YAML option...           option name=working_dir
WARN[0000] Skipping unsupported YAML option...           option name=build
WARN[0000] Skipping unsupported YAML option...           option name=working_dir
WARN[0000] Skipping unsupported YAML option...           option name=build
WARN[0000] Skipping unsupported YAML option...           option name=working_dir
WARN[0000] Skipping unsupported YAML option...           option name=build
ERRO[0000] Error registering task definition             error=ClientException: Container.image should not be null or empty.
    status code: 400, request id: 61061f57-9361-11e5-b7e7-99c8fdd92fa9 family=0xc2080bf640
ERRO[0000] Create task definition failed                 error=ClientException: Container.image should not be null or empty.
    status code: 400, request id: 61061f57-9361-11e5-b7e7-99c8fdd92fa9
FATA[0000] ClientException: Container.image should not be null or empty.
    status code: 400, request id: 61061f57-9361-11e5-b7e7-99c8fdd92fa9

@uttarasridhar
Copy link
Contributor

@previa, the build option is not supported at the moment, you will have to supply the image name.

@Korri
Copy link

Korri commented Dec 2, 2015

Any news on ClientException: host.sourcePath should not be blank I need a volume to share between my instances, but I don't want it to be persistent.

@Nyholm
Copy link

Nyholm commented Dec 9, 2015

I do also face this problem. Is there any workaround?

@philipn
Copy link

philipn commented Dec 13, 2015

FYI, a workaround here:

Just use VOLUME at the end of your relevant Dockerfile. This will do what you want. Then remove the non-host-specific volume entry from your docker-compose.yml file.

@theladyjaye
Copy link

👍 for this as well. It would be nice to be able to use volumes in the compose file or at LEAST provide a better error that it fails because of volumes.

@seanknox
Copy link

Hi @uttarasridhar has there been any movement on this issue?

@benfortuna
Copy link

FYI, another workaround if you don't have access to modify the Dockerfile:

Specify the host path explicitly, even if it is the same as the source path. e.g.

data:
  image: tianon/true
  volumes:
   - /opt/data:/opt/data

@ypadlyak
Copy link

Any ETA here?

@tiffanyfay tiffanyfay self-assigned this Dec 27, 2016
@L0wry
Copy link

L0wry commented Jan 3, 2017

Just got this working using

volumes: ["/hostshare:/containershare"]

@ypadlyak

tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 1, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 8, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 9, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 9, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 9, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 10, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 10, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 10, 2017
tiffanyfay added a commit to tiffanyfay/amazon-ecs-cli that referenced this issue Feb 10, 2017
@simplycloud simplycloud added this to the v0.5.0 milestone Feb 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests