errors with Docker-compose up

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
LVL 1
Bharath A.KAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bharath A.KAuthor 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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
python3

From novice to tech pro — start learning today.