Skip to content

Commit c2369f6

Browse files
fix(run): --bash and --shell depend on image entrypoint
Signed-off-by: Alexey Igrychev <alexey.igrychev@flant.com>
1 parent bc691f2 commit c2369f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/werf/run/run.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ func NewCmd(ctx context.Context) *cobra.Command {
9595
if len(cmdData.DockerOptions) == 0 && len(cmdData.DockerCommand) == 0 {
9696
cmdData.DockerOptions = []string{"-ti", "--rm"}
9797
if cmdData.Shell {
98-
cmdData.DockerCommand = []string{"/bin/sh"}
98+
cmdData.DockerOptions = append(cmdData.DockerOptions, "--entrypoint=/bin/sh")
9999
}
100100

101101
if cmdData.Bash {
102-
cmdData.DockerCommand = []string{"/bin/bash"}
102+
cmdData.DockerOptions = append(cmdData.DockerOptions, "--entrypoint=/bin/bash")
103103
}
104104
} else {
105105
common.PrintHelp(cmd)

0 commit comments

Comments
 (0)