Link to home
Start Free TrialLog in
Avatar of coder
coderFlag for Australia

asked on

how to call docker run with docker compose file

Hi Experts,

     I had build and run a docker image like this.

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

Open in new window


I want to use docker compose for the above two commands

I had created the docker compose like this.

version:'3'
services:
   harvest-trove:
      build: .
      image: harvest-trove:1.0.3
      volumes:
                -  .:/home/trove
           env_file:
        -  web-variables.env
            command: python3 manage.py migrate
  trove-pull:
    container_name:trove-pull     
    image: harvest-trove
    env_file:
       - web-variables.env
       depends_on:
         - harvest-trove
       command: harvest-trove:1.0.3 start pull
       restart:always

Open in new window


when I run docker-compose up I get the following error.

User generated image
Please help me in fixing this issue.

With Many thanks,
Bharath AK
ASKER CERTIFIED SOLUTION
Avatar of coder
coder
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial