sbt-docker icon indicating copy to clipboard operation
sbt-docker copied to clipboard

Provide SHELL Keyword from Dockerfile

Open ghost opened this issue 6 years ago • 2 comments

It should be possible to change the executing shell, like the SHELL command from DOCKERFILE: https://docs.docker.com/engine/reference/builder/#shell

ghost avatar May 15 '18 15:05 ghost

Do you mean in some other way than what is supported now? https://github.com/marcuslonnberg/sbt-docker/blob/master/src/main/scala/sbtdocker/DockerfileCommands.scala#L243

marcus-drake avatar May 15 '18 16:05 marcus-drake

Yeah. If I'm right, https://github.com/marcuslonnberg/sbt-docker/blob/master/src/main/scala/sbtdocker/DockerfileCommands.scala#L243 would also be executed in /bin/sh, see: https://github.com/marcuslonnberg/sbt-docker/blob/8a6afaceb362542b7d64538d48699ff3c361591f/src/main/scala/sbtdocker/Instructions.scala#L133

The SHELL command from Dockerfile: https://docs.docker.com/engine/reference/builder/#shell could override the default shell, used by shell form commands like RUN.

An example command from my Dockerfile: SHELL [ "/bin/bash", "-c" ]

I would like to create a pull request for the required changes to the files: "DockerfileCommands.scala" and "Instructions.scala" but actually I can't do that.

ghost avatar May 15 '18 21:05 ghost