Help Running Multiple Commands Within Docker Exec


archedraft

Recommended Posts

I am wanting to run multiple commands with a script that will update ports within a docker container.

 

Here is a sample of what I am trying to run:

docker exec -i deluge deluge-console (Now issue $1) (then issue $2) (then command $3)

$1=connect localhost user pass

$2=config --set random_port False

$3=config --set listen_ports (12345,12345)

 

Is it possible to do this with docker containers?

 

I can run these one by one within a ssh session. I think the main challenge is the deluge-console brings up a program and once the deluge-console screen is up it needs to run the 3 commands.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.