Support for Alpine images (using /bin/sh) in Pipelines

Issue #12864 resolved
Koichi Shiraishi (zchee)
created an issue

When using Alpine Linux based docker container(e.g. golang:1.7beta1-alpine), will occur

docker: Error response from daemon: Container command '/bin/bash' not found or does not exist.

Because docker run command with --entrypoint=/bin/bash, but Alpine Linux have not /bin/bash.

Alpine Linux is a next standard based image. I think there is a need to support it.

Do you have any idea or fix plan?

Comments (16)

  1. Sten Pittet
    • changed status to open

    Hi,

    Thanks for your feedback but that's something that we can't do. To use it with Alpine Linux you simply need to add bash to your container. Please see an example below.

    FROM alpine
    
    MAINTAINER yikaus <yikaus@gmail.com>
    RUN apk add --update bash && rm -rf /var/cache/apk/*
    

    Thanks,

    Sten

  2. Samuel Tannous staff

    Pipelines utilises bash specifics for log file markup, escaping and management of command execution so support for other shells is non-trivial. That's not to say we won't consider it but given the utility of bash for many users, we found it an acceptable requirement to have on the build image.

  3. Andy Kluger

    This is terrible. Please consider adding a pipelines option to install bash as a pre-step for existing standard images. And at the very least re-open this until this is actually resolved. To say "That's not to say we won't consider it" while closing this issue is confusing. Pipelines will not be useful for a lot of builds until this is addressed.

  4. Marc Sluiter

    wow, I spent hours in order to make a as small as possible docker image, which can both build and run my app (because you can't build a run-only image during build :/ ), just to notice that alpine images don't work because of missing bash?! Seriously, you can't just expect that everyone creates a wrapper just for this and change this to resolved!

  5. Matt Ryall staff

    This issue came up for discussion on the Node Docker project recently. As noted there, we still consider this issue important and would like to fix it in Pipelines, but don't currently have an ETA. This is not a trivial fix, so it needs to be properly tested so we don't break people's builds by changing the shell or adding fallback logic to the shell selection for Pipelines.

  6. Log in to comment