grailbio / reflow

A language and runtime for distributed, incremental data processing in the cloud
Apache License 2.0
965 stars 52 forks source link

Support for Docker images that don't have bash #132

Open niemasd opened 3 years ago

niemasd commented 3 years ago

I generally create Docker images using the Alpine base image to keep them compact and minimal. However, Alpine doesn't have bash by default (just sh), and Reflow doesn't seem to support images that don't have bash. For example, the following Reflow file doesn't run (it just hangs infinitely):

val Main = exec(image := "alpine", mem := GiB) (out file) {"
    echo hello world >>{{out}}
"}

However, using the niemasd/bash:latest image I created, which uses Alpine as its base image and just installs bash on top of it, the following Reflow file runs fine:

val Main = exec(image := "niemasd/bash:latest", mem := GiB) (out file) {"
    echo hello world >>{{out}}
"}

As a workaround, I'll just add bash to my Docker images because it's not too big compared to the other programs I install, but it would be nice to support sh or whatever other shells a given Docker image might have rather than requiring bash specifically