You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Rayees Namathponnan <ry...@gmail.com> on 2016/05/02 22:13:30 UTC

Passing command trough configuration json

Hi All,

In Docker file i have entry point  ENTRYPOINT ["/usr/sbin/sshd", "-D"]
I want to run run some command (eg : mkdir /tmp/test ) while staring
the container, since you add command in
configuration your default entry point wont work, so I added command
like "/usr/sbin/sshd -D && mkdir /tmp/test "
with the expectation both ssh start and mkdir will be executed while
strating the contanier.

Unfortunately mkdir command not executing but ssh works fine, not sure
command i provided worked itself
or container started with entry point provided in docker file

Any help ?


Regards,
Rayees

Re: Passing command trough configuration json

Posted by Rayees Namathponnan <ry...@gmail.com>.
Thanks it works.....

On Mon, May 2, 2016 at 1:32 PM, Evan Krall <kr...@yelp.com> wrote:

> Your command /usr/sbin/sshd -D && mkdir /tmp/test will run sshd in the
> foreground, wait until it finishes, and then run mkdir.
>
> Perhaps you want to put mkdir before sshd, since mkdir should complete
> quickly.
>
> On Mon, May 2, 2016 at 1:13 PM, Rayees Namathponnan <ryz.namathp@gmail.com
> > wrote:
>
>> Hi All,
>>
>> In Docker file i have entry point  ENTRYPOINT ["/usr/sbin/sshd", "-D"]
>> I want to run run some command (eg : mkdir /tmp/test ) while staring the container, since you add command in
>> configuration your default entry point wont work, so I added command like "/usr/sbin/sshd -D && mkdir /tmp/test "
>> with the expectation both ssh start and mkdir will be executed while strating the contanier.
>>
>> Unfortunately mkdir command not executing but ssh works fine, not sure command i provided worked itself
>> or container started with entry point provided in docker file
>>
>> Any help ?
>>
>>
>> Regards,
>> Rayees
>>
>>
>>
>

Re: Passing command trough configuration json

Posted by Evan Krall <kr...@yelp.com>.
Your command /usr/sbin/sshd -D && mkdir /tmp/test will run sshd in the
foreground, wait until it finishes, and then run mkdir.

Perhaps you want to put mkdir before sshd, since mkdir should complete
quickly.

On Mon, May 2, 2016 at 1:13 PM, Rayees Namathponnan <ry...@gmail.com>
wrote:

> Hi All,
>
> In Docker file i have entry point  ENTRYPOINT ["/usr/sbin/sshd", "-D"]
> I want to run run some command (eg : mkdir /tmp/test ) while staring the container, since you add command in
> configuration your default entry point wont work, so I added command like "/usr/sbin/sshd -D && mkdir /tmp/test "
> with the expectation both ssh start and mkdir will be executed while strating the contanier.
>
> Unfortunately mkdir command not executing but ssh works fine, not sure command i provided worked itself
> or container started with entry point provided in docker file
>
> Any help ?
>
>
> Regards,
> Rayees
>
>
>