errors with Docker-compose up

coder
coder used Ask the Experts™
on
Hi Experts,

I get the following errors with docker compose up

root@ip-10-252-14-11:/home/ubuntu/workarea/sourcecode/harvest-trove# docker-compose up
Recreating harvest-trove_harvest-trove_1 ... done
Creating harvest-trove_trove_review_1    ...
Creating harvest-trove_trove_pull_1      ... error
Creating harvest-trove_trove_push_1      ...
Creating harvest-trove_trove_process_1   ...

ERROR: for harvest-trove_trove_pull_1  Cannot start service trove_pull: invalid header field value "oci runtime error: container_linux.go:247: starting container procesCreating harvest-trove_trove_process_1   ... error

Creating harvest-trove_trove_push_1      ... error
Creating harvest-trove_trove_review_1    ... error

ERROR: for harvest-trove_trove_push_1  Cannot start service trove_push: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for harvest-trove_trove_review_1  Cannot start service trove_review: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for trove_pull  Cannot start service trove_pull: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for trove_process  Cannot start service trove_process: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for trove_push  Cannot start service trove_push: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"

ERROR: for trove_review  Cannot start service trove_review: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"harvest-trove:1.0.3\\\": executable file not found in $PATH\"\n"
ERROR: Encountered errors while bringing up the project.

Open in new window


the contents of the docker-compose.yml are

version: '3'
services:

   harvest-trove:
     build: .
     volumes:
       - .:/home/trove/
     env_file:
       - web-variables.env
     command: python3 manage.py migrate


   trove_pull:
     command: harvest-trove:1.0.3 start pull
     image: harvest-trove:1.0.3
     restart: always
     depends_on:
       - harvest-trove
     env_file:
       - web-variables.env

   trove_process:
     command : harvest-trove:1.0.3 start process
     image: harvest-trove:1.0.3
     restart: always
     depends_on:
        - harvest-trove
     env_file:
        - web-variables.env

   trove_push:
     command : harvest-trove:1.0.3 start push
     image: harvest-trove:1.0.3
     restart: always
     depends_on:
       - harvest-trove
     env_file:
       - web-variables.env

   trove_review:
      command : harvest-trove:1.0.3 start
      image: harvest-trove:1.0.3
      restart: always
      depends_on:
         - harvest-trove
      env_file:
         - web-variables.env
      ports:
         - '8010:80'

Open in new window


the docker commands which I run are working fine.  the docker commands which I use are

docker build -t harvest-trove:1.0.3 .

aws configure && $(aws ecr get-login --no-include-email --region ap-southeast-2)
Access Key ID: ******
Secret: ********
ap-southeast-2


declare -a trove_environment=(-e ELASTICSEARCH="[\"http://172.17.0.1\"]" -e STATIC_PATH='/trove/static/' -e CLOUD_WATCH=true -e SCRIPT_NAME=/trove -e AWS_ACCESS_KEY_ID=********** -e "AWS_SECRET_ACCESS_KEY=**********"  -e AWS_DEFAULT_REGION=ap-southeast-2 -e PRODUCTION=true -e "DATABASE=postgres://****:****@172.17.0.1/trove" -e "TROVE_KEY=******" -e "SECONDS_BETWEEN_HARVESTING=72000" -e "ITEMS_PER_FETCH=20" -e "EXIT_AFTER_X_SECONDS=300"  -e "ELASTICSEARCH_INDEX=***" -e "TROVE_API_BASE_URL=http://api.trove.nla.gov.au/****" -e "TERRITORY_STORIES_URL=territorystories.nt.gov.au" -e "HARVEST_PREFIX_URL=trove" -e "S3_BUCKET=*****" -e "S3_SITEMAP_PATH=sitemap" -e "SECONDS_BETWEEN_SITEMAPS=86400" -e "LOCAL_URL_PREFIX=https://********azonaws.com")

docker run ${trove_environment[@]} -it harvest-trove:1.0.3 python3.6 manage.py migrate

docker run --name trove_pull ${trove_environment[@]} -d --restart always harvest-trove:1.0.3 start pull

docker run --name trove_process ${trove_environment[@]} -d --restart always harvest-trove:1.0.3 start process

docker run --name trove_push ${trove_environment[@]} -d --restart always harvest-trove:1.0.3 start push

docker run --name trove_review ${trove_environment[@]} -d --restart always -p 8010:80 harvest-trove:1.0.3 start

Open in new window


But it fails with docker-compose up.  Please correct me where ever I am wrong and throw some light over it.

Please help me in resolving this issue.

With Many thanks,

Bharath AK
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
developer
Commented:
Hi Experts,

I had changed docker-compose.yml and now the errors are gone.

version: '3'
services:

   harvest-trove:
     build: .
     volumes:
       - .:/home/trove/
     env_file:
       - web-variables.env
     command: python3 manage.py migrate


   trove_pull:
     command: start pull
     container_name: trove_pull
     image: harvest-trove:1.0.3
     restart: always
     depends_on:
       - harvest-trove
     env_file:
       - web-variables.env

   trove_process:
     command : start process
     container_name: trove_process
     image: harvest-trove:1.0.3
     restart: always
     depends_on:
        - harvest-trove
     env_file:
        - web-variables.env

   trove_push:
     command : start push
     container_name: trove_push
     image: harvest-trove:1.0.3
     restart: always
     depends_on:
       - harvest-trove
     env_file:
       - web-variables.env


   trove_review:
      command : start
      container_name: trove_review
      image: harvest-trove:1.0.3
      restart: always
      depends_on:
         - harvest-trove
      env_file:
         - web-variables.env
      ports:
         - "8010:80"

Open in new window


now errors are gone.

With Many thanks,

Bharath AK

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial