From 362eea3b16ba58c56a09966c07272b0d07b03ba9 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sat, 6 Jun 2015 14:00:36 -0700 Subject: [PATCH] switch to /bin/sh instead of /bin/bash for portability --- Dockerfile.env | 11 +++++++++++ cmd/drone-build/run.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Dockerfile.env diff --git a/Dockerfile.env b/Dockerfile.env new file mode 100644 index 000000000..e76a8a31e --- /dev/null +++ b/Dockerfile.env @@ -0,0 +1,11 @@ +# build environment used in .drone.yml +# +# docker build --rm=true -t drone/golang -f Dockerfile.env . + +FROM gliderlabs/alpine:3.1 +RUN apk update && apk add ca-certificates curl git mercurial bzr perl openssh go && rm -rf /var/cache/apk/* + +ENV GOROOT /usr/lib/go +ENV GOPATH /drone +ENV GOBIN /drone/bin +ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin diff --git a/cmd/drone-build/run.go b/cmd/drone-build/run.go index 8d7ed460c..3ae15fedf 100644 --- a/cmd/drone-build/run.go +++ b/cmd/drone-build/run.go @@ -92,7 +92,7 @@ func execClone(c *Context) (int, error) { func execBuild(c *Context) (int, error) { conf := toContainerConfig(c.Conf.Build) - conf.Entrypoint = []string{"/bin/bash", "-e"} + conf.Entrypoint = []string{"/bin/sh", "-e"} conf.Cmd = []string{"/drone/bin/build.sh"} info, err := run(c.client, conf, c.Conf.Build.Pull) if err != nil {