allomov
4/16/2015 - 11:45 AM

bosh-init.Dockerfile

# image with installed bosh-init

FROM ubuntu:vivid
MAINTAINER Alex Lomov <lomov.as@gmail.com>

RUN rm -rf /var/lib/apt/lists/*
RUN apt-get update

RUN apt-get install -y git mercurial bzr

WORKDIR /opt

RUN wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
RUN tar xvf go1.4.2.linux-amd64.tar.gz
RUN mkdir -p /root/go
ENV GOROOT /opt/go
ENV GOPATH /root/go
ENV PATH $PATH:$GOROOT/bin

RUN go get -d github.com/cloudfoundry/bosh-init
WORKDIR $GOPATH/src/github.com/cloudfoundry/bosh-init/
RUN ./bin/build
ENV PATH $PATH:$GOPATH/src/github.com/cloudfoundry/bosh-init/out

WORKDIR /root

CMD ["bash"]