Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Commit

Permalink
Use 'sh' rather than 'bash' for compatibility with busybox and boot2d…
Browse files Browse the repository at this point in the history
…ocker
adfernandes committed Oct 15, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 577208a commit 8deac2f
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion export.go
Original file line number Diff line number Diff line change
@@ -531,7 +531,7 @@ func (e *Export) TarLayers(w io.Writer) error {
}
defer os.Chdir(cwd)

cmd := exec.Command("sudo", "/bin/bash", "-c", "tar cOf - *")
cmd := exec.Command("sudo", "/bin/sh", "-c", "tar cOf - *")
stdout, err := cmd.StdoutPipe()
if err != nil {
return err
2 changes: 1 addition & 1 deletion image.go
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ func (e *ExportedImage) TarLayer() error {
}
defer os.Chdir(cwd)

cmd := exec.Command("sudo", "/bin/bash", "-c", "tar cvf ../layer.tar ./")
cmd := exec.Command("sudo", "/bin/sh", "-c", "tar cvf ../layer.tar ./")
out, err := cmd.CombinedOutput()
if err != nil {
println(string(out))

0 comments on commit 8deac2f

Please sign in to comment.