2018-01-09 02:09:06 +00:00
|
|
|
FROM ubuntu:bionic
|
2016-02-18 07:16:47 +00:00
|
|
|
|
2018-02-09 03:42:53 +00:00
|
|
|
ENV GOVERSION 1.9.3
|
2016-02-18 07:16:47 +00:00
|
|
|
|
|
|
|
RUN apt-get update -y && \
|
|
|
|
apt-get install --no-install-recommends -y -q \
|
|
|
|
build-essential \
|
|
|
|
ca-certificates \
|
|
|
|
curl \
|
|
|
|
git \
|
|
|
|
ruby \
|
|
|
|
ruby-dev \
|
2018-01-09 02:09:06 +00:00
|
|
|
zip \
|
|
|
|
zlib1g-dev && \
|
2016-02-18 07:16:47 +00:00
|
|
|
gem install bundler
|
|
|
|
|
|
|
|
RUN mkdir /goroot && \
|
|
|
|
mkdir /gopath && \
|
|
|
|
curl https://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz | \
|
|
|
|
tar xzf - -C /goroot --strip-components=1
|
|
|
|
|
2016-02-18 17:31:04 +00:00
|
|
|
# We want to ensure that release builds never have any cgo dependencies so we
|
|
|
|
# switch that off at the highest level.
|
|
|
|
ENV CGO_ENABLED 0
|
2016-02-18 07:16:47 +00:00
|
|
|
ENV GOPATH /gopath
|
|
|
|
ENV GOROOT /goroot
|
|
|
|
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH
|
|
|
|
|
|
|
|
RUN mkdir -p $GOPATH/src/github.com/hashicorp/consul
|
|
|
|
WORKDIR $GOPATH/src/github.com/hashicorp/consul
|