Changing the default command of base docker images -



Changing the default command of base docker images -

i downloaded ubuntu base of operations image docker hub. trying build new image based on ubuntu image. however, want default command ubuntu image "/bin/bash -c" instead of "/bin/sh" when utilize run in dockerfile, accesses bash instead of sh. notice talking default command of same image, not image trying build.

i don't think there default command in ubuntu image. when run

$ docker run ubuntu echo hi hi

it runs ["/bin/echo", "hi"]. can verify running

$ docker run ubuntu set 2014/06/20 08:38:54 exec: "set": executable file not found in $path

set built-in command in shell, docker tries run external one.

if want alter default shell dash bash, can create image fixed symlink. here's dockerfile:

from ubuntu run ln -sf /bin/bash /bin/sh

[edit]

i realized you're talking about. don't know if can alter default run command, can explicitly utilize /bin/bash this:

run /bin/bash -c ...

docker

Comments

Popular posts from this blog

model view controller - MVC Rails Planning -

ruby on rails - Devise Logout Error in RoR -

html - Submenu setup with jquery and effect 'fold' -