Jump to content

How to add command to docker container

2 posts in this topic Last Reply

Recommended Posts

Trying to install Adb docker and have tried using label and passing arguments field but no luck getting the whole command below entered.


sh -c "/config/startup.sh & adb -a -P 5037 server nodaemon"


The video is below is what I’m trying to do and the screenshots are from the video showing what the command is and how it should look like in portainer. Right now I don’t have the first part of the command showing under the CMD field (sh -c "/config/startup.sh) before the ‘&’.


What is the syntax?


here is what I have tried in the extra parameters 


-cmd='sh -c "/config/startup.sh & adb -a -P 5037 server nodaemon"'




sh -c "/config/startup.sh & adb -a -P 5037 server nodaemon"





Edited by Ustrombase
Add info

Share this post

Link to post
On 9/16/2019 at 11:59 AM, Ustrombase said:

extra parameters

You would want post arguments

CMD (default command or options)

Recall the optional COMMAND in the Docker commandline:


This command is optional because the person who created the IMAGE may have already provided a default COMMAND using the Dockerfile CMD instruction. As the operator (the person running a container from the image), you can override that CMD instruction just by specifying a new COMMAND.

If the image also specifies an ENTRYPOINT then the CMD or COMMAND get appended as arguments to the ENTRYPOINT.


Edited by Squid

Share this post

Link to post

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.

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.