Skip to content

Commit

Permalink
Merge pull request #259 from litl/jbardin-sh
Browse files Browse the repository at this point in the history
use /bin/sh for docker shell
  • Loading branch information
James Bardin committed Jul 30, 2015
2 parents 6564c9e + 2753e1a commit 8fe18bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/commander/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func main() {
println(" app:delete Delete an app")
println(" app:restart Restart an app")
println(" app:run Run a command within an app on this host")
println(" app:shell Run a bash shell within an app on this host")
println(" app:shell Run a shell within an app on this host")
println(" app:start Starts one or more apps")
println(" app:stop Stops one or more apps")
println(" app:unassign Unassign an app from a pool")
Expand Down Expand Up @@ -638,7 +638,7 @@ func main() {
appFs := flag.NewFlagSet("app:shell", flag.ExitOnError)
appFs.Usage = func() {
println("Usage: commander app:shell <app>\n")
println(" Run a bash shell for an app\n")
println(" Run a shell for an app\n")
println("Options:\n")
appFs.PrintDefaults()
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ func (s *ServiceRuntime) RunCommand(env string, appCfg config.App, cmd []string)
envVars = append(envVars, "GALAXY_VERSION="+strconv.FormatInt(appCfg.ID(), 10))
envVars = append(envVars, fmt.Sprintf("GALAXY_INSTANCE=%s", strconv.FormatInt(int64(instanceId), 10)))

runCmd := []string{"/bin/bash", "-c", strings.Join(cmd, " ")}
runCmd := []string{"/bin/sh", "-c", strings.Join(cmd, " ")}

container, err := s.dockerClient.CreateContainer(docker.CreateContainerOptions{
Config: &docker.Config{
Expand Down Expand Up @@ -590,7 +590,7 @@ func (s *ServiceRuntime) StartInteractive(env, pool string, appCfg config.App) e
args = append(args, cpu)
}

args = append(args, []string{"-t", appCfg.Version(), "/bin/bash"}...)
args = append(args, []string{"-t", appCfg.Version(), "/bin/sh"}...)
// shell out to docker run to get signal forwarded and terminal setup correctly
//cmd := exec.Command("docker", "run", "-rm", "-i", "-t", appCfg.Version(), "/bin/bash")
cmd := exec.Command("docker", args...)
Expand Down

0 comments on commit 8fe18bb

Please sign in to comment.