Skip to main content
added 143 characters in body
Source Link
Vanuan
  • 33.8k
  • 11
  • 103
  • 105

I want to execute a command that uses commands from multiple containers.

E.g., I want to execute a backup script that used psql and pg_dump commands.

docker exec backup_containerdb_backup pg_dump
failed to exec: exec: "pg_dump": executable file not found in $PATH

docker run has an option --link. Is there a similar option for exec?

To clear this up, there are 3 containers:

  • my_app
  • db
  • db_backup

I want to use pg commands located in db from my db_backup scripts.

I want to execute a command that uses commands from multiple containers.

E.g., I want to execute a backup script that used psql and pg_dump commands.

docker exec backup_container pg_dump
failed to exec: exec: "pg_dump": executable file not found in $PATH

docker run has an option --link. Is there a similar option for exec?

I want to execute a command that uses commands from multiple containers.

E.g., I want to execute a backup script that used psql and pg_dump commands.

docker exec db_backup pg_dump
failed to exec: exec: "pg_dump": executable file not found in $PATH

docker run has an option --link. Is there a similar option for exec?

To clear this up, there are 3 containers:

  • my_app
  • db
  • db_backup

I want to use pg commands located in db from my db_backup scripts.

Source Link
Vanuan
  • 33.8k
  • 11
  • 103
  • 105

Docker: Run commands from multiple containers

I want to execute a command that uses commands from multiple containers.

E.g., I want to execute a backup script that used psql and pg_dump commands.

docker exec backup_container pg_dump
failed to exec: exec: "pg_dump": executable file not found in $PATH

docker run has an option --link. Is there a similar option for exec?